mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge mysql-5.1 -> mysql-5.1-innodb
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# 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 Library General Public
|
||||
@ -10,10 +10,9 @@
|
||||
# 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
|
||||
# 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
|
||||
|
||||
## Process this file with automake to create Makefile.in
|
||||
|
||||
|
@ -15,9 +15,13 @@ The syntax is as follows:
|
||||
and any subsequent characters are ignored.
|
||||
|
||||
4) The full test case name including the suite and execution mode
|
||||
must be specified, for example:
|
||||
may be specified, for example:
|
||||
main.alias 'row' # bug#00000
|
||||
|
||||
4b) Now, combinations will also be covered if only the test name is
|
||||
specified, for example:
|
||||
rpl.rpl_ps # Covers 'row', 'mix' and 'stmt'
|
||||
|
||||
5) As an exception to item 4, the last character of the test case
|
||||
specification may be an asterisk (*). In that case, all test cases that
|
||||
start with the same characters up to the last letter before the asterisk
|
||||
|
@ -21,7 +21,7 @@ main.outfile_loaddata @solaris # joro : Bug #46895
|
||||
|
||||
ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
|
||||
rpl.rpl_innodb_bug28430* @solaris # Bug#46029
|
||||
rpl.rpl_innodb_bug28430 @solaris # Bug#46029
|
||||
rpl.rpl_row_sp011 @solaris # Joro : Bug #54138
|
||||
|
||||
rpl_ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
|
43
mysql-test/include/restart_slave_sql.inc
Normal file
43
mysql-test/include/restart_slave_sql.inc
Normal file
@ -0,0 +1,43 @@
|
||||
# ==== Purpose ====
|
||||
#
|
||||
# Provide a earier way to restart SQL thread when you want to stop sql thread
|
||||
# and then start it immediately.
|
||||
#
|
||||
# Sources stop_slave_sql.inc to stop SQL thread on the current connection.
|
||||
# Then issues START SLAVE SQL_THREAD and then waits until
|
||||
# the SQL threads have started, or until a timeout is reached.
|
||||
#
|
||||
# Please use this instead of 'STOP|START SLAVE SQL_THREAD', to reduce the risk of
|
||||
# test case bugs.
|
||||
#
|
||||
#
|
||||
# ==== Usage ====
|
||||
#
|
||||
# [--let $slave_timeout= NUMBER]
|
||||
# [--let $rpl_debug= 1]
|
||||
# --source include/restart_slave_sql.inc
|
||||
#
|
||||
# Parameters:
|
||||
# $slave_timeout
|
||||
# See include/wait_for_slave_param.inc
|
||||
#
|
||||
# $rpl_debug
|
||||
# See include/rpl_init.inc
|
||||
|
||||
|
||||
--let $include_filename= restart_slave.inc
|
||||
--source include/begin_include_file.inc
|
||||
|
||||
|
||||
if (!$rpl_debug)
|
||||
{
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
source include/stop_slave_sql.inc;
|
||||
START SLAVE SQL_THREAD;
|
||||
source include/wait_for_slave_sql_to_start.inc;
|
||||
|
||||
|
||||
--let $include_filename= restart_slave.inc
|
||||
--source include/end_include_file.inc
|
2
mysql-test/include/rpl_connection_master.inc
Normal file
2
mysql-test/include/rpl_connection_master.inc
Normal file
@ -0,0 +1,2 @@
|
||||
let $rpl_connection_name= master;
|
||||
source include/rpl_connection.inc;
|
2
mysql-test/include/rpl_connection_slave.inc
Normal file
2
mysql-test/include/rpl_connection_slave.inc
Normal file
@ -0,0 +1,2 @@
|
||||
let $rpl_connection_name= slave;
|
||||
source include/rpl_connection.inc;
|
2
mysql-test/include/rpl_connection_slave1.inc
Normal file
2
mysql-test/include/rpl_connection_slave1.inc
Normal file
@ -0,0 +1,2 @@
|
||||
let $rpl_connection_name= slave1;
|
||||
source include/rpl_connection.inc;
|
@ -1,4 +1,20 @@
|
||||
# -*- cperl -*-
|
||||
# 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 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
|
||||
|
||||
package My::ConfigFactory;
|
||||
|
||||
use strict;
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (C) 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
|
||||
|
@ -1,4 +1,19 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
package My::File::Path;
|
||||
use strict;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (C) 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (C) 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (C) 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
|
||||
|
@ -1,14 +1,15 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# 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 General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
# 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 General Public License for more details.
|
||||
# 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 General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (C) 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2006 MySQL AB
|
||||
# Copyright (C) 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2000-2006 MySQL AB
|
||||
# Copyright (C) 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
/* Copyright (C) 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2008 MySQL AB
|
||||
/* Copyright (C) 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
/* Copyright (C) 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (C) 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
|
||||
|
@ -1,4 +1,18 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 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
|
||||
|
||||
|
||||
#
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004, 2006 MySQL AB
|
||||
# Copyright (C) 2004, 2006 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
# Copyright (C) 2004 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (C) 2004-2007 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 General Public License as published by
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# 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
|
||||
|
@ -1,15 +1,16 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-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.
|
||||
#
|
||||
# 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 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 General Public License for more details.
|
||||
#
|
||||
# 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 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright 2004-2008 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2004, 2011, 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
|
||||
@ -129,7 +129,8 @@ sub mtr_report_test ($) {
|
||||
# Find out if this test case is an experimental one, so we can treat
|
||||
# the failure as an expected failure instead of a regression.
|
||||
for my $exp ( @$::experimental_test_cases ) {
|
||||
if ( $exp ne $test_name ) {
|
||||
# Include pattern match for combinations
|
||||
if ( $exp ne $test_name && $test_name !~ /^$exp / ) {
|
||||
# if the expression is not the name of this test case, but has
|
||||
# an asterisk at the end, determine if the characters up to
|
||||
# but excluding the asterisk are the same
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2006 MySQL AB
|
||||
# Copyright (C) 2004-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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2006 MySQL AB
|
||||
# Copyright (C) 2006-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
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# 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 Library General Public
|
||||
@ -12,10 +12,9 @@
|
||||
# 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
|
||||
# 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
|
||||
|
||||
# ======================================================================
|
||||
# MySQL server stress test system
|
||||
|
@ -13,10 +13,9 @@
|
||||
# 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
|
||||
# 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
|
||||
|
||||
#
|
||||
##############################################################################
|
||||
|
@ -21,9 +21,9 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
|
||||
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<database name="test">
|
||||
<table_structure name="t1">
|
||||
<field Field="a&b" Type="int(11)" Null="YES" Key="" Extra="" />
|
||||
<field Field="a<b" Type="int(11)" Null="YES" Key="" Extra="" />
|
||||
<field Field="a>b" Type="text" Null="YES" Key="" Extra="" />
|
||||
<field Field="a&b" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
|
||||
<field Field="a<b" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
|
||||
<field Field="a>b" Type="text" Null="YES" Key="" Extra="" Comment="" />
|
||||
</table_structure>
|
||||
<table_data name="t1">
|
||||
<row>
|
||||
|
@ -1683,3 +1683,18 @@ ARMENIAN CAPIT DA 2
|
||||
ARMENIAN CAPIT ECH 2
|
||||
ARMENIAN CAPIT ZA 2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Start of 5.1 tests
|
||||
#
|
||||
#
|
||||
# Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function
|
||||
#
|
||||
SET NAMES latin1;
|
||||
DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1)
|
||||
AS BINARY(0)) USING utf8);
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'Zpq'
|
||||
Warning 1292 Truncated incorrect BINARY(0) value: '1.'
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@ -182,4 +182,9 @@ INSERT INTO t2 VALUES (1), (2), (3);
|
||||
SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
|
||||
1
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug#59149 valgrind warnings with "like .. escape .." function
|
||||
#
|
||||
SELECT '' LIKE '1' ESCAPE COUNT(1);
|
||||
ERROR HY000: Incorrect arguments to ESCAPE
|
||||
End of 5.1 tests
|
||||
|
@ -2612,4 +2612,20 @@ CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3))
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DECIMAL value: ''
|
||||
#
|
||||
# Bug#58165: "my_empty_string" gets modified and causes LOAD DATA to fail
|
||||
# and other crashes
|
||||
#
|
||||
CREATE TABLE t1 ( a TEXT );
|
||||
SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE 'bug58165.txt';
|
||||
SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' );
|
||||
insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' )
|
||||
x
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'b'
|
||||
LOAD DATA INFILE 'bug58165.txt' INTO TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
aaaaaaaaaaaaaa
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -1014,4 +1014,12 @@ SET @a=0x00000000030000000100000000000000000000000000144000000000000014400000000
|
||||
SET @a=POLYFROMWKB(@a);
|
||||
SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
|
||||
SET @a=POLYFROMWKB(@a);
|
||||
create table t1(a polygon NOT NULL)engine=myisam;
|
||||
insert into t1 values (geomfromtext("point(0 1)"));
|
||||
insert into t1 values (geomfromtext("point(1 0)"));
|
||||
select * from (select polygon(t1.a) as p from t1 order by t1.a) d;
|
||||
p
|
||||
NULL
|
||||
NULL
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
|
@ -2,3 +2,11 @@ mysqld is alive
|
||||
mysqladmin: unknown variable 'database=db1'
|
||||
Warning: mysqladmin: unknown variable 'loose-database=db2'
|
||||
mysqld is alive
|
||||
#
|
||||
# Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
|
||||
#
|
||||
# Executing mysqladmin with --sleep=1 and --count=2.
|
||||
# Done.
|
||||
# Displaying the output :
|
||||
mysqld is alive
|
||||
mysqld is alive
|
||||
|
@ -36,8 +36,8 @@ c1 LONGTEXT
|
||||
#
|
||||
# Insert some big rows.
|
||||
#
|
||||
256MB
|
||||
INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 16777216));
|
||||
64MB
|
||||
INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 4194304));
|
||||
affected rows: 1
|
||||
32MB
|
||||
INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 2097152));
|
||||
@ -53,7 +53,7 @@ affected rows: 1
|
||||
# Do not display the column value itself, just its length.
|
||||
#
|
||||
SELECT LENGTH(c1) FROM t1;
|
||||
LENGTH(c1) 268435456
|
||||
LENGTH(c1) 67108864
|
||||
LENGTH(c1) 33554432
|
||||
LENGTH(c1) 4194304
|
||||
LENGTH(c1) 524288
|
||||
@ -69,7 +69,7 @@ info: Rows matched: 4 Changed: 4 Warnings: 0
|
||||
# Do not display the column value itself, just its length.
|
||||
#
|
||||
SELECT LENGTH(c1) FROM t1;
|
||||
LENGTH(c1) 536870912
|
||||
LENGTH(c1) 134217728
|
||||
LENGTH(c1) 1048576
|
||||
LENGTH(c1) 67108864
|
||||
LENGTH(c1) 8388608
|
||||
|
@ -14,7 +14,7 @@ INSERT INTO t1 VALUES (1), (2);
|
||||
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<database name="test">
|
||||
<table_structure name="t1">
|
||||
<field Field="a" Type="int(11)" Null="YES" Key="MUL" Extra="" />
|
||||
<field Field="a" Type="int(11)" Null="YES" Key="MUL" Extra="" Comment="" />
|
||||
<key Table="t1" Non_unique="1" Key_name="a" Seq_in_index="1" Column_name="a" Collation="A" Null="YES" Index_type="BTREE" Comment="" />
|
||||
</table_structure>
|
||||
<table_data name="t1">
|
||||
@ -150,9 +150,9 @@ INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
|
||||
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<database name="test">
|
||||
<table_structure name="t1">
|
||||
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
|
||||
<field Field="b" Type="text" Null="YES" Key="" Extra="" />
|
||||
<field Field="c" Type="varchar(3)" Null="YES" Key="" Extra="" />
|
||||
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
|
||||
<field Field="b" Type="text" Null="YES" Key="" Extra="" Comment="" />
|
||||
<field Field="c" Type="varchar(3)" Null="YES" Key="" Extra="" Comment="" />
|
||||
</table_structure>
|
||||
<table_data name="t1">
|
||||
<row>
|
||||
@ -178,7 +178,7 @@ INSERT INTO t1 VALUES ("1\""), ("\"2");
|
||||
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<database name="test">
|
||||
<table_structure name="t1">
|
||||
<field Field="a"b"" Type="char(2)" Null="YES" Key="" Extra="" />
|
||||
<field Field="a"b"" Type="char(2)" Null="YES" Key="" Extra="" Comment="" />
|
||||
</table_structure>
|
||||
<table_data name="t1">
|
||||
<row>
|
||||
@ -1612,10 +1612,10 @@ CREATE TABLE `t2` (
|
||||
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<database name="mysqldump_test_db">
|
||||
<table_structure name="t1">
|
||||
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
|
||||
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
|
||||
</table_structure>
|
||||
<table_structure name="t2">
|
||||
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
|
||||
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
|
||||
</table_structure>
|
||||
</database>
|
||||
</mysqldump>
|
||||
@ -1623,10 +1623,10 @@ CREATE TABLE `t2` (
|
||||
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<database name="mysqldump_test_db">
|
||||
<table_structure name="t1">
|
||||
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
|
||||
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
|
||||
</table_structure>
|
||||
<table_structure name="t2">
|
||||
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
|
||||
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
|
||||
</table_structure>
|
||||
</database>
|
||||
</mysqldump>
|
||||
@ -3644,8 +3644,8 @@ INSERT INTO t1 VALUES(1,0xff00fef0);
|
||||
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<database name="test">
|
||||
<table_structure name="t1">
|
||||
<field Field="f1" Type="int(10)" Null="YES" Key="" Extra="" />
|
||||
<field Field="data" Type="mediumblob" Null="YES" Key="" Extra="" />
|
||||
<field Field="f1" Type="int(10)" Null="YES" Key="" Extra="" Comment="" />
|
||||
<field Field="data" Type="mediumblob" Null="YES" Key="" Extra="" Comment="" />
|
||||
</table_structure>
|
||||
<table_data name="t1">
|
||||
<row>
|
||||
@ -4576,5 +4576,20 @@ LENGTH(a)
|
||||
800
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug #13618 : mysqldump --xml ommit comment on table field
|
||||
#
|
||||
CREATE TABLE `comment_table` (i INT COMMENT 'FIELD COMMENT') COMMENT = 'TABLE COMMENT';
|
||||
<?xml version="1.0"?>
|
||||
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<database name="test">
|
||||
<table_structure name="comment_table">
|
||||
<field Field="i" Type="int(11)" Null="YES" Key="" Extra="" Comment="FIELD COMMENT" />
|
||||
</table_structure>
|
||||
<table_data name="comment_table">
|
||||
</table_data>
|
||||
</database>
|
||||
</mysqldump>
|
||||
DROP TABLE `comment_table`;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@ -311,12 +311,33 @@ failing query in let
|
||||
create table t1 (a varchar(100));
|
||||
insert into t1 values ('`select 42`');
|
||||
`select 42`
|
||||
insert into t1 values ('$dollar');
|
||||
$dollar
|
||||
`select 42`
|
||||
drop table t1;
|
||||
mysqltest: At line 1: Error running query 'failing query': 1064 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 'failing query' at line 1
|
||||
mysqltest: At line 1: Missing required argument 'filename' to command 'source'
|
||||
mysqltest: At line 1: Could not open './non_existingFile' for reading, errno: 2
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": At line 1: query 'garbage ' failed: 1064: 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 1
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql":
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
included from MYSQLTEST_VARDIR/tmp/recursive.sql at line 1:
|
||||
At line 1: Source directives are nesting too deep
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql":
|
||||
included from MYSQLTEST_VARDIR/tmp/error.sql at line 1:
|
||||
At line 1: query 'garbage ' failed: 1064: 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 1
|
||||
|
||||
2 = outer loop variable after while
|
||||
here is the sourced script
|
||||
@ -410,7 +431,9 @@ Beta is true
|
||||
while with string, only once
|
||||
1
|
||||
Testing while with not
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc":
|
||||
included from MYSQLTEST_VARDIR/tmp/mysqltest_while.inc at line 65:
|
||||
At line 64: Nesting too deeply
|
||||
mysqltest: At line 1: missing '(' in while
|
||||
mysqltest: At line 1: missing ')' in while
|
||||
mysqltest: At line 1: Missing '{' after while. Found "dec $i"
|
||||
@ -459,8 +482,12 @@ mysqltest: At line 1: query 'connect con2,localhost,root,,illegal_db' failed: 1
|
||||
mysqltest: At line 1: Illegal argument for port: 'illegal_port'
|
||||
mysqltest: At line 1: Illegal option to connect: SMTP
|
||||
200 connects succeeded
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql":
|
||||
included from MYSQLTEST_VARDIR/tmp/mysqltest.sql at line 3:
|
||||
At line 3: connection 'test_con1' not found in connection pool
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql":
|
||||
included from MYSQLTEST_VARDIR/tmp/mysqltest.sql at line 2:
|
||||
At line 2: Connection test_con1 already exists
|
||||
show tables;
|
||||
ERROR 3D000: No database selected
|
||||
connect con1,localhost,root,,;
|
||||
|
@ -1778,7 +1778,7 @@ c1 bigint,
|
||||
c2 set('sweet'),
|
||||
key (c2,c1,c0),
|
||||
key(c0)
|
||||
) engine=myisam partition by hash (month(c0)) partitions 5;
|
||||
) engine=myisam partition by hash (c0) partitions 5;
|
||||
insert ignore into t1 set c0 = -6502262, c1 = 3992917, c2 = 35019;
|
||||
insert ignore into t1 set c0 = 241221, c1 = -6862346, c2 = 56644;
|
||||
select c1 from t1 group by (select c0 from t1 limit 1);
|
||||
|
@ -1,5 +1,643 @@
|
||||
drop table if exists t1;
|
||||
#
|
||||
# Bug#54483: valgrind errors when making warnings for multiline inserts
|
||||
# into partition
|
||||
#
|
||||
CREATE TABLE t1 (a VARBINARY(10))
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a CHAR(10))
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIMESTAMP)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
INSERT INTO t1 VALUES ('test'),('a'),('5');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'a' at row 1
|
||||
Warning 1265 Data truncated for column 'a' at row 2
|
||||
Warning 1265 Data truncated for column 'a' at row 3
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1265 Data truncated for column 'a' at row 1
|
||||
Warning 1265 Data truncated for column 'a' at row 2
|
||||
Warning 1265 Data truncated for column 'a' at row 3
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
INSERT INTO t1 VALUES ('test'),('a'),('5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
Warning 1264 Out of range value for column 'a' at row 2
|
||||
Warning 1264 Out of range value for column 'a' at row 3
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
Warning 1264 Out of range value for column 'a' at row 2
|
||||
Warning 1264 Out of range value for column 'a' at row 3
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1486 Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
# TO_SECONDS() is added in 5.5.
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TO_SECONDS(a));
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')' at line 2
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TO_DAYS(FROM_DAYS(a)));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
ERROR HY000: The PARTITION function returns the wrong type
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TO_DAYS(FROM_DAYS(a)));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
ERROR HY000: The PARTITION function returns the wrong type
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
# Bug#57071
|
||||
CREATE TABLE t1
|
||||
(`date` date,
|
||||
`extracted_week` int,
|
||||
`yearweek` int,
|
||||
`week` int,
|
||||
`default_week_format` int)
|
||||
PARTITION BY LIST (EXTRACT(WEEK FROM date) % 3)
|
||||
(PARTITION p0 VALUES IN (0),
|
||||
PARTITION p1 VALUES IN (1),
|
||||
PARTITION p2 VALUES IN (2));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1
|
||||
(`date` date,
|
||||
`extracted_week` int,
|
||||
`yearweek` int,
|
||||
`week` int,
|
||||
`default_week_format` int);
|
||||
SET @old_default_week_format := @@default_week_format;
|
||||
SET default_week_format = 0;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 1;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 2;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 3;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 4;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 5;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 6;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 7;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SELECT * FROM t1;
|
||||
date extracted_week yearweek week default_week_format
|
||||
2000-01-01 0 199952 0 0
|
||||
2000-01-01 0 199952 0 1
|
||||
2000-01-01 52 199952 52 2
|
||||
2000-01-01 52 199952 52 3
|
||||
2000-01-01 0 199952 0 4
|
||||
2000-01-01 0 199952 0 5
|
||||
2000-01-01 52 199952 52 6
|
||||
2000-01-01 52 199952 52 7
|
||||
SET default_week_format = @old_default_week_format;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
# EXTRACT(WEEK...) is disallowed, see bug#57071.
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME, b DATE)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATE, b DATETIME)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME, b DATE)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE, b VARCHAR(10))
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT, b DATETIME)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
#
|
||||
# Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
|
||||
#
|
||||
CREATE TABLE t1 (a INT) PARTITION BY HASH (a);
|
||||
|
@ -164,5 +164,16 @@ a b
|
||||
2 NULL
|
||||
DROP TABLE t1, t2, t3, t4, t5;
|
||||
#
|
||||
# Bug#58207: invalid memory reads when using default column value and
|
||||
# tmptable needed
|
||||
#
|
||||
CREATE TABLE t(a VARCHAR(245) DEFAULT
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
|
||||
INSERT INTO t VALUES (''),(''),(''),(''),(''),(''),(''),(''),(''),(''),('');
|
||||
SELECT * FROM (SELECT default(a) FROM t GROUP BY a) d;
|
||||
default(a)
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
DROP TABLE t;
|
||||
#
|
||||
# End of 5.1 tests.
|
||||
#
|
||||
|
@ -637,4 +637,15 @@ CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime) AS DECIMAL(30,7))
|
||||
20080729104251.1234560
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect datetime value: '2008-07-29T10:42:51.1234567'
|
||||
#
|
||||
# Bug#59173: Failure to handle DATE(TIME) values where Year, Month or
|
||||
# Day is ZERO
|
||||
#
|
||||
CREATE TABLE t1 (dt1 DATETIME);
|
||||
INSERT INTO t1 (dt1) VALUES ('0000-00-01 00:00:01');
|
||||
DELETE FROM t1 WHERE dt1 = '0000-00-01 00:00:01';
|
||||
# Should be empty
|
||||
SELECT * FROM t1;
|
||||
dt1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -1248,3 +1248,129 @@ Note 1449 The user specified as a definer ('unknown'@'unknown') does not exist
|
||||
LOCK TABLES v1 READ;
|
||||
ERROR HY000: The user specified as a definer ('unknown'@'unknown') does not exist
|
||||
DROP VIEW v1;
|
||||
#
|
||||
# Bug #58499 "DEFINER-security view selecting from INVOKER-security view
|
||||
# access check wrong".
|
||||
#
|
||||
# Check that we correctly handle privileges for various combinations
|
||||
# of INVOKER and DEFINER-security views using each other.
|
||||
DROP DATABASE IF EXISTS mysqltest1;
|
||||
CREATE DATABASE mysqltest1;
|
||||
USE mysqltest1;
|
||||
CREATE TABLE t1 (i INT);
|
||||
CREATE TABLE t2 (j INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2);
|
||||
#
|
||||
# 1) DEFINER-security view uses INVOKER-security view (covers
|
||||
# scenario originally described in the bug report).
|
||||
CREATE SQL SECURITY INVOKER VIEW v1_uses_t1 AS SELECT * FROM t1;
|
||||
CREATE SQL SECURITY INVOKER VIEW v1_uses_t2 AS SELECT * FROM t2;
|
||||
CREATE USER 'mysqluser1'@'%';
|
||||
GRANT CREATE VIEW ON mysqltest1.* TO 'mysqluser1'@'%';
|
||||
GRANT SELECT ON t1 TO 'mysqluser1'@'%';
|
||||
# To be able create 'v2_uses_t2' we also need select on t2.
|
||||
GRANT SELECT ON t2 TO 'mysqluser1'@'%';
|
||||
GRANT SELECT ON v1_uses_t1 TO 'mysqluser1'@'%';
|
||||
GRANT SELECT ON v1_uses_t2 TO 'mysqluser1'@'%';
|
||||
#
|
||||
# Connection 'mysqluser1'.
|
||||
CREATE SQL SECURITY DEFINER VIEW v2_uses_t1 AS SELECT * FROM v1_uses_t1;
|
||||
CREATE SQL SECURITY DEFINER VIEW v2_uses_t2 AS SELECT * FROM v1_uses_t2;
|
||||
#
|
||||
# Connection 'default'.
|
||||
CREATE USER 'mysqluser2'@'%';
|
||||
GRANT SELECT ON v2_uses_t1 TO 'mysqluser2'@'%';
|
||||
GRANT SELECT ON v2_uses_t2 TO 'mysqluser2'@'%';
|
||||
GRANT SELECT ON t2 TO 'mysqluser2'@'%';
|
||||
GRANT CREATE VIEW ON mysqltest1.* TO 'mysqluser2'@'%';
|
||||
# Make 'mysqluser1' unable to access t2.
|
||||
REVOKE SELECT ON t2 FROM 'mysqluser1'@'%';
|
||||
#
|
||||
# Connection 'mysqluser2'.
|
||||
# The below statement should succeed thanks to suid nature of v2_uses_t1.
|
||||
SELECT * FROM v2_uses_t1;
|
||||
i
|
||||
1
|
||||
# The below statement should fail due to suid nature of v2_uses_t2.
|
||||
SELECT * FROM v2_uses_t2;
|
||||
ERROR HY000: View 'mysqltest1.v2_uses_t2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
#
|
||||
# 2) INVOKER-security view uses INVOKER-security view.
|
||||
#
|
||||
# Connection 'default'.
|
||||
DROP VIEW v2_uses_t1, v2_uses_t2;
|
||||
CREATE SQL SECURITY INVOKER VIEW v2_uses_t1 AS SELECT * FROM v1_uses_t1;
|
||||
CREATE SQL SECURITY INVOKER VIEW v2_uses_t2 AS SELECT * FROM v1_uses_t2;
|
||||
GRANT SELECT ON v2_uses_t1 TO 'mysqluser1'@'%';
|
||||
GRANT SELECT ON v2_uses_t2 TO 'mysqluser1'@'%';
|
||||
GRANT SELECT ON v1_uses_t1 TO 'mysqluser2'@'%';
|
||||
GRANT SELECT ON v1_uses_t2 TO 'mysqluser2'@'%';
|
||||
#
|
||||
# Connection 'mysqluser1'.
|
||||
# For both versions of 'v2' 'mysqluser1' privileges should be used.
|
||||
SELECT * FROM v2_uses_t1;
|
||||
i
|
||||
1
|
||||
SELECT * FROM v2_uses_t2;
|
||||
ERROR HY000: View 'mysqltest1.v2_uses_t2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
#
|
||||
# Connection 'mysqluser2'.
|
||||
# And now for both versions of 'v2' 'mysqluser2' privileges should
|
||||
# be used.
|
||||
SELECT * FROM v2_uses_t1;
|
||||
ERROR HY000: View 'mysqltest1.v2_uses_t1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
SELECT * FROM v2_uses_t2;
|
||||
j
|
||||
2
|
||||
#
|
||||
# 3) INVOKER-security view uses DEFINER-security view.
|
||||
#
|
||||
# Connection 'default'.
|
||||
DROP VIEW v1_uses_t1, v1_uses_t2;
|
||||
# To be able create 'v1_uses_t2' we also need select on t2.
|
||||
GRANT SELECT ON t2 TO 'mysqluser1'@'%';
|
||||
#
|
||||
# Connection 'mysqluser1'.
|
||||
CREATE SQL SECURITY DEFINER VIEW v1_uses_t1 AS SELECT * FROM t1;
|
||||
CREATE SQL SECURITY DEFINER VIEW v1_uses_t2 AS SELECT * FROM t2;
|
||||
#
|
||||
# Connection 'default'.
|
||||
# Make 'mysqluser1' unable to access t2.
|
||||
REVOKE SELECT ON t2 FROM 'mysqluser1'@'%';
|
||||
#
|
||||
# Connection 'mysqluser2'.
|
||||
# Due to suid nature of v1_uses_t1 and v1_uses_t2 the first
|
||||
# select should succeed and the second select should fail.
|
||||
SELECT * FROM v2_uses_t1;
|
||||
i
|
||||
1
|
||||
SELECT * FROM v2_uses_t2;
|
||||
ERROR HY000: View 'mysqltest1.v2_uses_t2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
#
|
||||
# 4) DEFINER-security view uses DEFINER-security view.
|
||||
#
|
||||
# Connection 'default'.
|
||||
DROP VIEW v2_uses_t1, v2_uses_t2;
|
||||
# To be able create 'v2_uses_t2' we also need select on t2.
|
||||
GRANT SELECT ON t2 TO 'mysqluser1'@'%';
|
||||
#
|
||||
# Connection 'mysqluser2'.
|
||||
CREATE SQL SECURITY DEFINER VIEW v2_uses_t1 AS SELECT * FROM v1_uses_t1;
|
||||
CREATE SQL SECURITY DEFINER VIEW v2_uses_t2 AS SELECT * FROM v1_uses_t2;
|
||||
#
|
||||
# Connection 'default'.
|
||||
# Make 'mysqluser1' unable to access t2.
|
||||
REVOKE SELECT ON t2 FROM 'mysqluser1'@'%';
|
||||
#
|
||||
# Connection 'mysqluser2'.
|
||||
# Again privileges of creator of innermost views should apply.
|
||||
SELECT * FROM v2_uses_t1;
|
||||
i
|
||||
1
|
||||
SELECT * FROM v2_uses_t2;
|
||||
ERROR HY000: View 'mysqltest1.v2_uses_t2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
USE test;
|
||||
DROP DATABASE mysqltest1;
|
||||
DROP USER 'mysqluser1'@'%';
|
||||
DROP USER 'mysqluser2'@'%';
|
||||
|
@ -1113,4 +1113,15 @@ SELECT UPDATEXML(NULL, (LPAD(0.1111E-15, '2011', 1)), 1);
|
||||
ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing
|
||||
SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1));
|
||||
ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing
|
||||
#
|
||||
# Bug #44332 my_xml_scan reads behind the end of buffer
|
||||
#
|
||||
SELECT UPDATEXML(CONVERT(_latin1'<' USING utf8),'1','1');
|
||||
UPDATEXML(CONVERT(_latin1'<' USING utf8),'1','1')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1525 Incorrect XML value: 'parse error at line 1 pos 2: END-OF-INPUT unexpected (ident or '/' wanted)'
|
||||
SELECT UPDATEXML(CONVERT(_latin1'<!--' USING utf8),'1','1');
|
||||
UPDATEXML(CONVERT(_latin1'<!--' USING utf8),'1','1')
|
||||
NULL
|
||||
End of 5.1 tests
|
||||
|
@ -88,8 +88,9 @@ let $val2 = '2006-01-17';
|
||||
let $val3 = '2006-02-25';
|
||||
let $val4 = '2006-02-05';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
let $coltype = char(30);
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# Disabled after fixing bug#54483.
|
||||
#let $coltype = char(30);
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = extract(month from col1);
|
||||
let $valsqlfunc = extract(year from '1998-11-23');
|
||||
@ -139,8 +140,9 @@ let $val2 = '14:30:20';
|
||||
let $val3 = '21:59:22';
|
||||
let $val4 = '10:22:33';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
let $coltype = char(30);
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# second(non_time_col) is disabled after bug#54483.
|
||||
#let $coltype = char(30);
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = month(col1);
|
||||
let $valsqlfunc = month('2006-10-14');
|
||||
@ -172,26 +174,28 @@ let $val3 = '21:59:22';
|
||||
let $val4 = '10:33:11';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = to_days(col1)-to_days('2006-01-01');
|
||||
let $valsqlfunc = to_days('2006-02-02')-to_days('2006-01-01');
|
||||
let $coltype = date;
|
||||
let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
let $val1 = '2006-02-03';
|
||||
let $val2 = '2006-01-17';
|
||||
let $val3 = '2006-01-25';
|
||||
let $val4 = '2006-02-06';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
# to_days(non_date_col) is disabled after bug#54483.
|
||||
#let $sqlfunc = to_days(col1)-to_days('2006-01-01');
|
||||
#let $valsqlfunc = to_days('2006-02-02')-to_days('2006-01-01');
|
||||
#let $coltype = date;
|
||||
#let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
#let $val1 = '2006-02-03';
|
||||
#let $val2 = '2006-01-17';
|
||||
#let $val3 = '2006-01-25';
|
||||
#let $val4 = '2006-02-06';
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
# to_days(non_date_col) is disabled after bug#54483.
|
||||
# DATEDIFF() is implemented as (TO_DAYS(d1) - TO_DAYS(d2))
|
||||
let $sqlfunc = datediff(col1, '2006-01-01');
|
||||
let $valsqlfunc = datediff('2006-02-02', '2006-01-01');
|
||||
let $coltype = date;
|
||||
let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
let $val1 = '2006-02-03';
|
||||
let $val2 = '2006-01-17';
|
||||
let $val3 = '2006-01-25';
|
||||
let $val4 = '2006-02-06';
|
||||
--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
#let $sqlfunc = datediff(col1, '2006-01-01');
|
||||
#let $valsqlfunc = datediff('2006-02-02', '2006-01-01');
|
||||
#let $coltype = date;
|
||||
#let $infile = part_supported_sql_funcs_int_date.inc;
|
||||
#let $val1 = '2006-02-03';
|
||||
#let $val2 = '2006-01-17';
|
||||
#let $val3 = '2006-01-25';
|
||||
#let $val4 = '2006-02-06';
|
||||
#--source suite/parts/inc/partition_supported_sql_funcs.inc
|
||||
|
||||
let $sqlfunc = weekday(col1);
|
||||
let $valsqlfunc = weekday('2006-10-14');
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -128,5 +128,47 @@ START SLAVE SQL_THREAD;
|
||||
include/wait_for_slave_sql_to_start.inc
|
||||
# Test end
|
||||
SET GLOBAL debug= '$debug_save';
|
||||
include/restart_slave.inc
|
||||
[connection master]
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
# Bug#58546 test rpl_packet timeout failure sporadically on PB
|
||||
# ----------------------------------------------------------------------
|
||||
# STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
|
||||
# possible that IO thread stopped after replicating part of a transaction
|
||||
# which SQL thread was executing. SQL thread would be hung if the
|
||||
# transaction could not be rolled back safely.
|
||||
# It caused some sporadic failures on PB2.
|
||||
#
|
||||
# This test verifies that when 'STOP SLAVE' is issued by a user, IO
|
||||
# thread will continue to fetch the rest events of the transaction which
|
||||
# is being executed by SQL thread and is not able to be rolled back safely.
|
||||
CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(1, 1);
|
||||
SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
|
||||
[connection slave]
|
||||
include/restart_slave.inc
|
||||
BEGIN;
|
||||
UPDATE t1 SET c2 = 2 WHERE c1 = 1;
|
||||
[connection master]
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES(2, 2);
|
||||
INSERT INTO t2 VALUES(1);
|
||||
UPDATE t1 SET c2 = 3 WHERE c1 = 1;
|
||||
COMMIT;
|
||||
[connection slave1]
|
||||
STOP SLAVE;
|
||||
[connection slave]
|
||||
ROLLBACK;
|
||||
[connection master]
|
||||
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
[connection slave]
|
||||
include/wait_for_slave_to_stop.inc
|
||||
[connection slave1]
|
||||
include/start_slave.inc
|
||||
[connection master]
|
||||
DROP TABLE t1, t2;
|
||||
SET GLOBAL debug= $debug_save;
|
||||
include/rpl_end.inc
|
||||
|
@ -26,8 +26,8 @@ let $old_net_buffer_length= `SELECT @@global.net_buffer_length`;
|
||||
SET @@global.max_allowed_packet=1024;
|
||||
SET @@global.net_buffer_length=1024;
|
||||
|
||||
sync_slave_with_master;
|
||||
# Restart slave for setting to take effect
|
||||
connection slave;
|
||||
source include/stop_slave.inc;
|
||||
source include/start_slave.inc;
|
||||
|
||||
|
@ -54,7 +54,69 @@ source extra/rpl_tests/rpl_stop_slave.test;
|
||||
|
||||
--echo # Test end
|
||||
SET GLOBAL debug= '$debug_save';
|
||||
source include/restart_slave_sql.inc;
|
||||
|
||||
connection master;
|
||||
--source include/rpl_connection_master.inc
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo
|
||||
--echo # Bug#58546 test rpl_packet timeout failure sporadically on PB
|
||||
--echo # ----------------------------------------------------------------------
|
||||
--echo # STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
|
||||
--echo # possible that IO thread stopped after replicating part of a transaction
|
||||
--echo # which SQL thread was executing. SQL thread would be hung if the
|
||||
--echo # transaction could not be rolled back safely.
|
||||
--echo # It caused some sporadic failures on PB2.
|
||||
--echo #
|
||||
--echo # This test verifies that when 'STOP SLAVE' is issued by a user, IO
|
||||
--echo # thread will continue to fetch the rest events of the transaction which
|
||||
--echo # is being executed by SQL thread and is not able to be rolled back safely.
|
||||
|
||||
CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(1, 1);
|
||||
|
||||
let $debug_save= `SELECT @@GLOBAL.debug`;
|
||||
SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
|
||||
|
||||
sync_slave_with_master;
|
||||
|
||||
--source include/rpl_connection_slave.inc
|
||||
source include/restart_slave_sql.inc;
|
||||
|
||||
BEGIN;
|
||||
UPDATE t1 SET c2 = 2 WHERE c1 = 1;
|
||||
|
||||
--source include/rpl_connection_master.inc
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES(2, 2);
|
||||
INSERT INTO t2 VALUES(1);
|
||||
UPDATE t1 SET c2 = 3 WHERE c1 = 1;
|
||||
COMMIT;
|
||||
|
||||
--source include/rpl_connection_slave1.inc
|
||||
let $show_statement= SHOW PROCESSLIST;
|
||||
let $field= Info;
|
||||
let $condition= = 'UPDATE t1 SET c2 = 3 WHERE c1 = 1';
|
||||
source include/wait_show_condition.inc;
|
||||
|
||||
send STOP SLAVE;
|
||||
|
||||
--source include/rpl_connection_slave.inc
|
||||
ROLLBACK;
|
||||
|
||||
--source include/rpl_connection_master.inc
|
||||
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
||||
--source include/rpl_connection_slave.inc
|
||||
source include/wait_for_slave_to_stop.inc;
|
||||
|
||||
--source include/rpl_connection_slave1.inc
|
||||
reap;
|
||||
source include/start_slave.inc;
|
||||
|
||||
--source include/rpl_connection_master.inc
|
||||
DROP TABLE t1, t2;
|
||||
SET GLOBAL debug= $debug_save;
|
||||
--source include/rpl_end.inc
|
||||
|
@ -64,12 +64,12 @@ SET last = pct;
|
||||
END IF;
|
||||
END WHILE;
|
||||
END//
|
||||
CREATE PROCEDURE check_pct(IN num DECIMAL)
|
||||
CREATE PROCEDURE check_pct(IN success_on_wait BOOLEAN)
|
||||
BEGIN
|
||||
IF (dirty_pct() < num) THEN
|
||||
IF (success_on_wait > 0) THEN
|
||||
SELECT 'BELOW_MAX' AS PCT_VALUE;
|
||||
ELSE
|
||||
SELECT 'ABOVE_MAX' AS PCT_VALUE;
|
||||
SELECT 'ABOVE_MAX or TimeOut Of The Test' AS PCT_VALUE;
|
||||
END IF;
|
||||
END//
|
||||
CREATE TABLE t1(
|
||||
@ -83,7 +83,7 @@ CALL add_until(10);
|
||||
FLUSH TABLES;
|
||||
CALL add_records(500);
|
||||
'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
|
||||
CALL check_pct(10);
|
||||
CALL check_pct(1);
|
||||
PCT_VALUE
|
||||
BELOW_MAX
|
||||
DROP PROCEDURE add_records;
|
||||
|
@ -117,12 +117,12 @@ BEGIN
|
||||
END WHILE;
|
||||
END//
|
||||
|
||||
CREATE PROCEDURE check_pct(IN num DECIMAL)
|
||||
CREATE PROCEDURE check_pct(IN success_on_wait BOOLEAN)
|
||||
BEGIN
|
||||
IF (dirty_pct() < num) THEN
|
||||
IF (success_on_wait > 0) THEN
|
||||
SELECT 'BELOW_MAX' AS PCT_VALUE;
|
||||
ELSE
|
||||
SELECT 'ABOVE_MAX' AS PCT_VALUE;
|
||||
SELECT 'ABOVE_MAX or TimeOut Of The Test' AS PCT_VALUE;
|
||||
END IF;
|
||||
END//
|
||||
|
||||
@ -155,7 +155,8 @@ let $wait_condition= SELECT (dirty_pct() <= @@global.innodb_max_dirty_pages_pct)
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--echo 'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
|
||||
CALL check_pct(10);
|
||||
# Value For $sucess will be set from include/wait_condition.inc file. It can have values 1 or 0. It will be 1 if dirty_pct() <= @@global.innodb_max_dirty_pages_pct else it will be 0.
|
||||
eval CALL check_pct($success);
|
||||
DROP PROCEDURE add_records;
|
||||
DROP PROCEDURE add_until;
|
||||
DROP PROCEDURE check_pct;
|
||||
|
@ -211,3 +211,19 @@ SELECT min(comment),count(*) FROM t1 GROUP BY ucs2_f;
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Start of 5.1 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function
|
||||
--echo #
|
||||
|
||||
SET NAMES latin1;
|
||||
DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1)
|
||||
AS BINARY(0)) USING utf8);
|
||||
--echo #
|
||||
--echo # End of 5.1 tests
|
||||
--echo #
|
||||
|
@ -126,5 +126,10 @@ INSERT INTO t2 VALUES (1), (2), (3);
|
||||
SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#59149 valgrind warnings with "like .. escape .." function
|
||||
--echo #
|
||||
--error ER_WRONG_ARGUMENTS
|
||||
SELECT '' LIKE '1' ESCAPE COUNT(1);
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -1369,4 +1369,15 @@ DROP TABLE t1;
|
||||
SELECT '1' IN ('1', SUBSTRING(-9223372036854775809, 1));
|
||||
SELECT CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3));
|
||||
|
||||
--echo #
|
||||
--echo # Bug#58165: "my_empty_string" gets modified and causes LOAD DATA to fail
|
||||
--echo # and other crashes
|
||||
--echo #
|
||||
CREATE TABLE t1 ( a TEXT );
|
||||
SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE 'bug58165.txt';
|
||||
SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' );
|
||||
LOAD DATA INFILE 'bug58165.txt' INTO TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -358,7 +358,7 @@ t1 where object_id=85998;
|
||||
|
||||
# Expected result is 36.3310176346905, but IA64 returns 36.3310176346904
|
||||
# due to fused multiply-add instructions.
|
||||
--replace_result 36.3310176346904 36.3310176346905
|
||||
--replace_result 36.3310176346904 36.3310176346905 -114.87787186923326 -114.87787186923313 36.33101763469053 36.33101763469059 36.33101763469043 36.33101763469059
|
||||
select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
|
||||
t1 where object_id=85984;
|
||||
|
||||
@ -744,4 +744,14 @@ SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000
|
||||
SET @a=POLYFROMWKB(@a);
|
||||
|
||||
|
||||
#
|
||||
# Bug #57321 crashes and valgrind errors from spatial types
|
||||
#
|
||||
|
||||
create table t1(a polygon NOT NULL)engine=myisam;
|
||||
insert into t1 values (geomfromtext("point(0 1)"));
|
||||
insert into t1 values (geomfromtext("point(1 0)"));
|
||||
select * from (select polygon(t1.a) as p from t1 order by t1.a) d;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -33,3 +33,15 @@ EOF
|
||||
--exec $MYSQLADMIN --defaults-file=$MYSQLTEST_VARDIR/tmp/bug10608.cnf -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping 2>&1
|
||||
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/bug10608.cnf;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
|
||||
--echo #
|
||||
|
||||
--echo # Executing mysqladmin with --sleep=1 and --count=2.
|
||||
--exec $MYSQLADMIN -u root -S $MASTER_MYSOCK -P $MASTER_MYPORT --sleep=1 --count=2 ping > $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
|
||||
--echo # Done.
|
||||
--echo # Displaying the output :
|
||||
--cat_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
|
||||
|
@ -79,8 +79,8 @@ eval CREATE TABLE t1 (
|
||||
--echo # Insert some big rows.
|
||||
--echo #
|
||||
|
||||
--echo 256MB
|
||||
INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 16777216));
|
||||
--echo 64MB
|
||||
INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 4194304));
|
||||
|
||||
--echo 32MB
|
||||
INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 2097152));
|
||||
|
@ -2164,6 +2164,15 @@ SELECT LENGTH(a) FROM t2;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
###########################################################################
|
||||
|
||||
--echo #
|
||||
--echo # Bug #13618 : mysqldump --xml ommit comment on table field
|
||||
--echo #
|
||||
|
||||
CREATE TABLE `comment_table` (i INT COMMENT 'FIELD COMMENT') COMMENT = 'TABLE COMMENT';
|
||||
--exec $MYSQL_DUMP --compact --skip-create --xml test
|
||||
DROP TABLE `comment_table`;
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.1 tests
|
||||
--echo #
|
||||
|
@ -859,6 +859,12 @@ insert into t1 values ('`select 42`');
|
||||
let $a= `select * from t1`;
|
||||
# This should output `select 42`, not evaluate it again to 42
|
||||
echo $a;
|
||||
insert into t1 values ('$dollar');
|
||||
# These should also output the string without evaluating it.
|
||||
let $a= query_get_value(select * from t1 order by a, a, 1);
|
||||
echo $a;
|
||||
let $a= query_get_value(select * from t1 order by a, a, 2);
|
||||
echo $a;
|
||||
drop table t1;
|
||||
|
||||
--error 1
|
||||
|
@ -1821,15 +1821,16 @@ while ($cnt)
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG#32272: partition crash 1: enum column
|
||||
# BUG#32772: partition crash 1: enum column
|
||||
#
|
||||
# Note that month(int_col) is disallowed after bug#54483.
|
||||
create table t1 (
|
||||
c0 int,
|
||||
c1 bigint,
|
||||
c2 set('sweet'),
|
||||
key (c2,c1,c0),
|
||||
key(c0)
|
||||
) engine=myisam partition by hash (month(c0)) partitions 5;
|
||||
) engine=myisam partition by hash (c0) partitions 5;
|
||||
|
||||
--disable_warnings
|
||||
insert ignore into t1 set c0 = -6502262, c1 = 3992917, c2 = 35019;
|
||||
|
@ -10,6 +10,670 @@ drop table if exists t1;
|
||||
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#54483: valgrind errors when making warnings for multiline inserts
|
||||
--echo # into partition
|
||||
--echo #
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARBINARY(10))
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a CHAR(10))
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIMESTAMP)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
INSERT INTO t1 VALUES ('test'),('a'),('5');
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
INSERT INTO t1 VALUES ('test'),('a'),('5');
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a))
|
||||
(PARTITION a1 VALUES LESS THAN (60));
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TO_DAYS(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (DAYOFMONTH(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (MONTH(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (DAYOFYEAR(a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (HOUR(a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (MINUTE(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (QUARTER(a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (SECOND(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (YEARWEEK(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (WEEKDAY(a));
|
||||
--echo # TO_SECONDS() is added in 5.5.
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TO_SECONDS(a));
|
||||
#--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
#CREATE TABLE t1 (a TIME)
|
||||
#PARTITION BY HASH (TO_SECONDS(a));
|
||||
#CREATE TABLE t1 (a DATE)
|
||||
#PARTITION BY HASH (TO_SECONDS(a));
|
||||
#DROP TABLE t1;
|
||||
#CREATE TABLE t1 (a DATETIME)
|
||||
#PARTITION BY HASH (TO_SECONDS(a));
|
||||
#DROP TABLE t1;
|
||||
#--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
#CREATE TABLE t1 (a VARCHAR(10))
|
||||
#PARTITION BY HASH (TO_SECONDS(a));
|
||||
#--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
#CREATE TABLE t1 (a INT)
|
||||
#PARTITION BY HASH (TO_SECONDS(a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TO_DAYS(FROM_DAYS(a)));
|
||||
--error ER_PARTITION_FUNC_NOT_ALLOWED_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TO_DAYS(FROM_DAYS(a)));
|
||||
--error ER_PARTITION_FUNC_NOT_ALLOWED_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (FROM_DAYS(a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (MICROSECOND(a));
|
||||
--echo # Bug#57071
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1
|
||||
(`date` date,
|
||||
`extracted_week` int,
|
||||
`yearweek` int,
|
||||
`week` int,
|
||||
`default_week_format` int)
|
||||
PARTITION BY LIST (EXTRACT(WEEK FROM date) % 3)
|
||||
(PARTITION p0 VALUES IN (0),
|
||||
PARTITION p1 VALUES IN (1),
|
||||
PARTITION p2 VALUES IN (2));
|
||||
CREATE TABLE t1
|
||||
(`date` date,
|
||||
`extracted_week` int,
|
||||
`yearweek` int,
|
||||
`week` int,
|
||||
`default_week_format` int);
|
||||
SET @old_default_week_format := @@default_week_format;
|
||||
SET default_week_format = 0;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 1;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 2;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 3;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 4;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 5;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 6;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SET default_week_format = 7;
|
||||
INSERT INTO t1 VALUES ('2000-01-01', EXTRACT(WEEK FROM '2000-01-01'), YEARWEEK('2000-01-01'), WEEK('2000-01-01'), @@default_week_format);
|
||||
SELECT * FROM t1;
|
||||
SET default_week_format = @old_default_week_format;
|
||||
DROP TABLE t1;
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(YEAR FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(YEAR_MONTH FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(QUARTER FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MONTH FROM a));
|
||||
|
||||
--echo # EXTRACT(WEEK...) is disallowed, see bug#57071.
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(WEEK FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_HOUR FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MINUTE FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_SECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MINUTE FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_SECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_SECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(SECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MICROSECOND FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(DAY_MICROSECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(HOUR_MICROSECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(MINUTE_MICROSECOND FROM a));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (EXTRACT(SECOND_MICROSECOND FROM a));
|
||||
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a TIME, b DATE)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
CREATE TABLE t1 (a DATE, b DATETIME)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATETIME, b DATE)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE, b VARCHAR(10))
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT, b DATETIME)
|
||||
PARTITION BY HASH (DATEDIFF(a, b));
|
||||
|
||||
CREATE TABLE t1 (a TIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a DATE)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
CREATE TABLE t1 (a DATETIME)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
DROP TABLE t1;
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a VARCHAR(10))
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY HASH (TIME_TO_SEC(a));
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
|
||||
--echo #
|
||||
|
@ -136,6 +136,16 @@ SELECT * FROM t1 WHERE NULL NOT IN ( SELECT c FROM t2 WHERE c = 1 AND c <> 1 );
|
||||
|
||||
DROP TABLE t1, t2, t3, t4, t5;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#58207: invalid memory reads when using default column value and
|
||||
--echo # tmptable needed
|
||||
--echo #
|
||||
CREATE TABLE t(a VARCHAR(245) DEFAULT
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
|
||||
INSERT INTO t VALUES (''),(''),(''),(''),(''),(''),(''),(''),(''),(''),('');
|
||||
SELECT * FROM (SELECT default(a) FROM t GROUP BY a) d;
|
||||
DROP TABLE t;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.1 tests.
|
||||
|
@ -445,4 +445,15 @@ SELECT CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.012345' AS
|
||||
# show we truncate microseconds from the right
|
||||
SELECT CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime) AS DECIMAL(30,7));
|
||||
|
||||
--echo #
|
||||
--echo # Bug#59173: Failure to handle DATE(TIME) values where Year, Month or
|
||||
--echo # Day is ZERO
|
||||
--echo #
|
||||
CREATE TABLE t1 (dt1 DATETIME);
|
||||
INSERT INTO t1 (dt1) VALUES ('0000-00-01 00:00:01');
|
||||
DELETE FROM t1 WHERE dt1 = '0000-00-01 00:00:01';
|
||||
--echo # Should be empty
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -1503,8 +1503,6 @@ SHOW CREATE VIEW v1;
|
||||
DROP TABLE t1;
|
||||
DROP VIEW v1;
|
||||
|
||||
# Wait till we reached the initial number of concurrent sessions
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo #
|
||||
--echo # Bug #46019: ERROR 1356 When selecting from within another
|
||||
@ -1546,3 +1544,145 @@ CREATE DEFINER=`unknown`@`unknown` SQL SECURITY DEFINER VIEW v1 AS SELECT 1;
|
||||
--error ER_NO_SUCH_USER
|
||||
LOCK TABLES v1 READ;
|
||||
DROP VIEW v1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #58499 "DEFINER-security view selecting from INVOKER-security view
|
||||
--echo # access check wrong".
|
||||
--echo #
|
||||
--echo # Check that we correctly handle privileges for various combinations
|
||||
--echo # of INVOKER and DEFINER-security views using each other.
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mysqltest1;
|
||||
--enable_warnings
|
||||
CREATE DATABASE mysqltest1;
|
||||
USE mysqltest1;
|
||||
CREATE TABLE t1 (i INT);
|
||||
CREATE TABLE t2 (j INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2);
|
||||
--echo #
|
||||
--echo # 1) DEFINER-security view uses INVOKER-security view (covers
|
||||
--echo # scenario originally described in the bug report).
|
||||
CREATE SQL SECURITY INVOKER VIEW v1_uses_t1 AS SELECT * FROM t1;
|
||||
CREATE SQL SECURITY INVOKER VIEW v1_uses_t2 AS SELECT * FROM t2;
|
||||
CREATE USER 'mysqluser1'@'%';
|
||||
GRANT CREATE VIEW ON mysqltest1.* TO 'mysqluser1'@'%';
|
||||
GRANT SELECT ON t1 TO 'mysqluser1'@'%';
|
||||
--echo # To be able create 'v2_uses_t2' we also need select on t2.
|
||||
GRANT SELECT ON t2 TO 'mysqluser1'@'%';
|
||||
GRANT SELECT ON v1_uses_t1 TO 'mysqluser1'@'%';
|
||||
GRANT SELECT ON v1_uses_t2 TO 'mysqluser1'@'%';
|
||||
--echo #
|
||||
--echo # Connection 'mysqluser1'.
|
||||
--connect (mysqluser1, localhost, mysqluser1,,mysqltest1)
|
||||
CREATE SQL SECURITY DEFINER VIEW v2_uses_t1 AS SELECT * FROM v1_uses_t1;
|
||||
CREATE SQL SECURITY DEFINER VIEW v2_uses_t2 AS SELECT * FROM v1_uses_t2;
|
||||
--echo #
|
||||
--echo # Connection 'default'.
|
||||
--connection default
|
||||
CREATE USER 'mysqluser2'@'%';
|
||||
GRANT SELECT ON v2_uses_t1 TO 'mysqluser2'@'%';
|
||||
GRANT SELECT ON v2_uses_t2 TO 'mysqluser2'@'%';
|
||||
GRANT SELECT ON t2 TO 'mysqluser2'@'%';
|
||||
GRANT CREATE VIEW ON mysqltest1.* TO 'mysqluser2'@'%';
|
||||
--echo # Make 'mysqluser1' unable to access t2.
|
||||
REVOKE SELECT ON t2 FROM 'mysqluser1'@'%';
|
||||
--echo #
|
||||
--echo # Connection 'mysqluser2'.
|
||||
--connect (mysqluser2, localhost, mysqluser2,,mysqltest1)
|
||||
--echo # The below statement should succeed thanks to suid nature of v2_uses_t1.
|
||||
SELECT * FROM v2_uses_t1;
|
||||
--echo # The below statement should fail due to suid nature of v2_uses_t2.
|
||||
--error ER_VIEW_INVALID
|
||||
SELECT * FROM v2_uses_t2;
|
||||
--echo #
|
||||
--echo # 2) INVOKER-security view uses INVOKER-security view.
|
||||
--echo #
|
||||
--echo # Connection 'default'.
|
||||
--connection default
|
||||
DROP VIEW v2_uses_t1, v2_uses_t2;
|
||||
CREATE SQL SECURITY INVOKER VIEW v2_uses_t1 AS SELECT * FROM v1_uses_t1;
|
||||
CREATE SQL SECURITY INVOKER VIEW v2_uses_t2 AS SELECT * FROM v1_uses_t2;
|
||||
GRANT SELECT ON v2_uses_t1 TO 'mysqluser1'@'%';
|
||||
GRANT SELECT ON v2_uses_t2 TO 'mysqluser1'@'%';
|
||||
GRANT SELECT ON v1_uses_t1 TO 'mysqluser2'@'%';
|
||||
GRANT SELECT ON v1_uses_t2 TO 'mysqluser2'@'%';
|
||||
--echo #
|
||||
--echo # Connection 'mysqluser1'.
|
||||
--connection mysqluser1
|
||||
--echo # For both versions of 'v2' 'mysqluser1' privileges should be used.
|
||||
SELECT * FROM v2_uses_t1;
|
||||
--error ER_VIEW_INVALID
|
||||
SELECT * FROM v2_uses_t2;
|
||||
--echo #
|
||||
--echo # Connection 'mysqluser2'.
|
||||
--connection mysqluser2
|
||||
--echo # And now for both versions of 'v2' 'mysqluser2' privileges should
|
||||
--echo # be used.
|
||||
--error ER_VIEW_INVALID
|
||||
SELECT * FROM v2_uses_t1;
|
||||
SELECT * FROM v2_uses_t2;
|
||||
--echo #
|
||||
--echo # 3) INVOKER-security view uses DEFINER-security view.
|
||||
--echo #
|
||||
--echo # Connection 'default'.
|
||||
--connection default
|
||||
DROP VIEW v1_uses_t1, v1_uses_t2;
|
||||
--echo # To be able create 'v1_uses_t2' we also need select on t2.
|
||||
GRANT SELECT ON t2 TO 'mysqluser1'@'%';
|
||||
--echo #
|
||||
--echo # Connection 'mysqluser1'.
|
||||
--connection mysqluser1
|
||||
CREATE SQL SECURITY DEFINER VIEW v1_uses_t1 AS SELECT * FROM t1;
|
||||
CREATE SQL SECURITY DEFINER VIEW v1_uses_t2 AS SELECT * FROM t2;
|
||||
--echo #
|
||||
--echo # Connection 'default'.
|
||||
--connection default
|
||||
--echo # Make 'mysqluser1' unable to access t2.
|
||||
REVOKE SELECT ON t2 FROM 'mysqluser1'@'%';
|
||||
--echo #
|
||||
--echo # Connection 'mysqluser2'.
|
||||
--connection mysqluser2
|
||||
--echo # Due to suid nature of v1_uses_t1 and v1_uses_t2 the first
|
||||
--echo # select should succeed and the second select should fail.
|
||||
SELECT * FROM v2_uses_t1;
|
||||
--error ER_VIEW_INVALID
|
||||
SELECT * FROM v2_uses_t2;
|
||||
--echo #
|
||||
--echo # 4) DEFINER-security view uses DEFINER-security view.
|
||||
--echo #
|
||||
--echo # Connection 'default'.
|
||||
--connection default
|
||||
DROP VIEW v2_uses_t1, v2_uses_t2;
|
||||
--echo # To be able create 'v2_uses_t2' we also need select on t2.
|
||||
GRANT SELECT ON t2 TO 'mysqluser1'@'%';
|
||||
--echo #
|
||||
--echo # Connection 'mysqluser2'.
|
||||
--connection mysqluser2
|
||||
CREATE SQL SECURITY DEFINER VIEW v2_uses_t1 AS SELECT * FROM v1_uses_t1;
|
||||
CREATE SQL SECURITY DEFINER VIEW v2_uses_t2 AS SELECT * FROM v1_uses_t2;
|
||||
--echo #
|
||||
--echo # Connection 'default'.
|
||||
--connection default
|
||||
--echo # Make 'mysqluser1' unable to access t2.
|
||||
REVOKE SELECT ON t2 FROM 'mysqluser1'@'%';
|
||||
--echo #
|
||||
--echo # Connection 'mysqluser2'.
|
||||
--connection mysqluser2
|
||||
--echo # Again privileges of creator of innermost views should apply.
|
||||
SELECT * FROM v2_uses_t1;
|
||||
--error ER_VIEW_INVALID
|
||||
SELECT * FROM v2_uses_t2;
|
||||
|
||||
--disconnect mysqluser1
|
||||
--disconnect mysqluser2
|
||||
--connection default
|
||||
USE test;
|
||||
DROP DATABASE mysqltest1;
|
||||
DROP USER 'mysqluser1'@'%';
|
||||
DROP USER 'mysqluser2'@'%';
|
||||
|
||||
|
||||
# Wait till we reached the initial number of concurrent sessions
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@ -640,5 +640,10 @@ SELECT UPDATEXML(NULL, (LPAD(0.1111E-15, '2011', 1)), 1);
|
||||
--error ER_ILLEGAL_VALUE_FOR_TYPE
|
||||
SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1));
|
||||
|
||||
--echo #
|
||||
--echo # Bug #44332 my_xml_scan reads behind the end of buffer
|
||||
--echo #
|
||||
SELECT UPDATEXML(CONVERT(_latin1'<' USING utf8),'1','1');
|
||||
SELECT UPDATEXML(CONVERT(_latin1'<!--' USING utf8),'1','1');
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2005, 2008 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 Library General Public
|
||||
@ -10,10 +10,9 @@
|
||||
# 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
|
||||
# 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
|
||||
|
||||
#
|
||||
# Suppress some common (not fatal) errors in system libraries found by valgrind
|
||||
|
Reference in New Issue
Block a user