diff options
author | unknown <sanja@montyprogram.com> | 2014-02-05 20:35:11 +0200 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2014-02-05 20:35:11 +0200 |
commit | 52311b72e6aee3fec0dc13f4273138f7aeea7d71 (patch) | |
tree | cea3548235426688ce80bd07a46c82c24c6ea58a /mysql-test | |
parent | f68eac2eadb9bdb3d9c3554b37d6c253f04562d2 (diff) | |
parent | bfdbb17990b198ff2a7e5eda5e2a365a1c6d8906 (diff) | |
download | mariadb-git-52311b72e6aee3fec0dc13f4273138f7aeea7d71.tar.gz |
merge 10.0-base ->10.0
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ps.result | 21 | ||||
-rw-r--r-- | mysql-test/suite/plugins/r/cassandra.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/plugins/t/unix_socket.test | 13 | ||||
-rw-r--r-- | mysql-test/t/ps.test | 23 |
4 files changed, 60 insertions, 3 deletions
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index bfec91192a9..4ac47bb8554 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -4019,4 +4019,25 @@ c1 NULL 2 DROP TABLE t1,t2; +# +# MDEV-5369: Wrong result (0 instead of NULL) on 2nd execution of +# PS with LEFT JOIN, TEMPTABLE view +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (0),(8); +CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=MyISAM; +CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; +SELECT SUM(pk) FROM t1 LEFT JOIN v2 ON a = pk; +SUM(pk) +NULL +PREPARE stmt FROM "SELECT SUM(pk) FROM t1 LEFT JOIN v2 ON a = pk"; +EXECUTE stmt; +SUM(pk) +NULL +EXECUTE stmt; +SUM(pk) +NULL +DEALLOCATE PREPARE stmt; +DROP VIEW v2; +DROP TABLE t1, t2; # End of 5.3 tests diff --git a/mysql-test/suite/plugins/r/cassandra.result b/mysql-test/suite/plugins/r/cassandra.result index f95044a057c..67ae2cab708 100644 --- a/mysql-test/suite/plugins/r/cassandra.result +++ b/mysql-test/suite/plugins/r/cassandra.result @@ -219,7 +219,7 @@ drop table t1; # CREATE TABLE t1 (my_primary_key varchar(10) PRIMARY KEY) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf10'; -ERROR HY000: Internal error: 'target column family has no key_alias defined, PRIMARY KEY column must be named 'rowkey'' +ERROR HY000: Internal error: target column family has no key_alias defined, PRIMARY KEY column must be named 'rowkey' CREATE TABLE t1 (rowkey varchar(10) PRIMARY KEY) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf10'; DROP TABLE t1; @@ -365,7 +365,7 @@ drop table t2; CREATE TABLE t2 (rowkey varchar(32) PRIMARY KEY, varint_col varbinary(2)) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf9'; select rowkey, hex(varint_col) from t2; -ERROR HY000: Internal error: 'Unable to convert value for field `varint_col` from Cassandra's data format. Source data is 4 bytes, 0x12345678' +ERROR HY000: Internal error: Unable to convert value for field `varint_col` from Cassandra's data format. Source data is 4 bytes, 0x12345678 drop table t2; # # Decimal datatype support @@ -557,7 +557,7 @@ delete from t1; drop table t1; CREATE TABLE t1 (rowkey varchar(10) PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cfd1'; select * from t1; -ERROR HY000: Internal error: 'Unable to convert value for field `dyn` from Cassandra's data format. Name length exceed limit of 16383: 'very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_v' +ERROR HY000: Internal error: Unable to convert value for field `dyn` from Cassandra's data format. Name length exceed limit of 16383: 'very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_v drop table t1; CREATE TABLE t1 (rowkey int PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cfd2'; diff --git a/mysql-test/suite/plugins/t/unix_socket.test b/mysql-test/suite/plugins/t/unix_socket.test index 72106fab46d..5869e2717c9 100644 --- a/mysql-test/suite/plugins/t/unix_socket.test +++ b/mysql-test/suite/plugins/t/unix_socket.test @@ -3,10 +3,23 @@ # get .result differences from CURRENT_USER(). --source include/not_as_root.inc +# The previous check verifies that the user does not have root permissions. +# However in some cases tests are run under a user named 'root', +# even although this user does not have real root permissions. +# This test should be skipped in this case, since it does not expect +# that there are records in mysql.user where user=<username> +if ($USER=="root") { + skip Cannot be run by user named 'root' even if it does not have all privileges; +} + if (!$AUTH_SOCKET_SO) { skip No auth_socket plugin; } +if (!$USER) { + skip USER variable is undefined; +} + let $plugindir=`SELECT @@global.plugin_dir`; eval install plugin unix_socket soname '$AUTH_SOCKET_SO'; diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 5f4c815a192..4200f7435fb 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -3594,4 +3594,27 @@ EXECUTE stmt; DROP TABLE t1,t2; + +--echo # +--echo # MDEV-5369: Wrong result (0 instead of NULL) on 2nd execution of +--echo # PS with LEFT JOIN, TEMPTABLE view +--echo # + + +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (0),(8); + +CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=MyISAM; +CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; + +SELECT SUM(pk) FROM t1 LEFT JOIN v2 ON a = pk; + +PREPARE stmt FROM "SELECT SUM(pk) FROM t1 LEFT JOIN v2 ON a = pk"; +EXECUTE stmt; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; + +DROP VIEW v2; +DROP TABLE t1, t2; + --echo # End of 5.3 tests |