diff options
author | unknown <jimw@mysql.com> | 2005-03-03 15:01:46 -0800 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-03-03 15:01:46 -0800 |
commit | daaeeedb499cd27ff0279d8321808cdbccdd7e09 (patch) | |
tree | d9fcf7c0806dd22a5d3dc0996b6c7b4ff240cbb9 /mysql-test | |
parent | 80b474bfc0c77ae2a4b477b15ac6681b05d33e6d (diff) | |
parent | 92895d00527f62a57ed569f85df01dbf4f0db9c3 (diff) | |
download | mariadb-git-daaeeedb499cd27ff0279d8321808cdbccdd7e09.tar.gz |
Merged from 4.1
innobase/os/os0file.c:
Auto merged
innobase/srv/srv0start.c:
Auto merged
mysql-test/r/bigint.result:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/r/symlink.result:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/symlink.test:
Auto merged
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
ndb/test/ndbapi/testNodeRestart.cpp:
Auto merged
ndb/test/run-test/daily-devel-tests.txt:
Auto merged
sql/item.h:
Auto merged
strings/ctype-win1250ch.c:
Auto merged
mysql-test/r/grant2.result:
Hand-merged new test
mysql-test/t/grant2.test:
Hand-merged new test
ndb/include/ndbapi/NdbTransaction.hpp:
Used 5.0 version per tomas
sql/sql_acl.cc:
Merge fix for Bug #3309.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/include/have_cp1250_ch.inc | 4 | ||||
-rw-r--r-- | mysql-test/r/bigint.result | 39 | ||||
-rw-r--r-- | mysql-test/r/ctype_cp1250_ch.result | 9 | ||||
-rw-r--r-- | mysql-test/r/grant2.result | 16 | ||||
-rw-r--r-- | mysql-test/r/have_cp1250_ch.require | 2 | ||||
-rw-r--r-- | mysql-test/r/mysqldump.result | 21 | ||||
-rw-r--r-- | mysql-test/r/symlink.result | 12 | ||||
-rw-r--r-- | mysql-test/t/bigint.test | 33 | ||||
-rw-r--r-- | mysql-test/t/ctype_cp1250_ch.test | 12 | ||||
-rw-r--r-- | mysql-test/t/grant2.test | 14 | ||||
-rw-r--r-- | mysql-test/t/mysqldump.test | 9 | ||||
-rw-r--r-- | mysql-test/t/symlink.test | 15 |
12 files changed, 164 insertions, 22 deletions
diff --git a/mysql-test/include/have_cp1250_ch.inc b/mysql-test/include/have_cp1250_ch.inc new file mode 100644 index 00000000000..eec5d69fbd6 --- /dev/null +++ b/mysql-test/include/have_cp1250_ch.inc @@ -0,0 +1,4 @@ +-- require r/have_cp1250_ch.require +disable_query_log; +show collation like "cp1250_czech_cs"; +enable_query_log; diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 4268b121b1d..50e99e3ecd7 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -87,3 +87,42 @@ drop table t1; SELECT '0x8000000000000001'+0; '0x8000000000000001'+0 0 +create table t1 ( +value64 bigint unsigned not null, +value32 integer not null, +primary key(value64, value32) +); +create table t2 ( +value64 bigint unsigned not null, +value32 integer not null, +primary key(value64, value32) +); +insert into t1 values(17156792991891826145, 1); +insert into t1 values( 9223372036854775807, 2); +insert into t2 values(17156792991891826145, 3); +insert into t2 values( 9223372036854775807, 4); +select * from t1; +value64 value32 +9223372036854775807 2 +17156792991891826145 1 +select * from t2; +value64 value32 +9223372036854775807 4 +17156792991891826145 3 +select * from t1, t2 where t1.value64=17156792991891826145 and +t2.value64=17156792991891826145; +value64 value32 value64 value32 +17156792991891826145 1 17156792991891826145 3 +select * from t1, t2 where t1.value64=17156792991891826145 and +t2.value64=t1.value64; +value64 value32 value64 value32 +17156792991891826145 1 17156792991891826145 3 +select * from t1, t2 where t1.value64= 9223372036854775807 and +t2.value64=9223372036854775807; +value64 value32 value64 value32 +9223372036854775807 2 9223372036854775807 4 +select * from t1, t2 where t1.value64= 9223372036854775807 and +t2.value64=t1.value64; +value64 value32 value64 value32 +9223372036854775807 2 9223372036854775807 4 +drop table t1, t2; diff --git a/mysql-test/r/ctype_cp1250_ch.result b/mysql-test/r/ctype_cp1250_ch.result new file mode 100644 index 00000000000..62936b84caf --- /dev/null +++ b/mysql-test/r/ctype_cp1250_ch.result @@ -0,0 +1,9 @@ +SHOW COLLATION LIKE 'cp1250_czech_cs'; +Collation Charset Id Default Compiled Sortlen +cp1250_czech_cs cp1250 34 Yes 2 +CREATE TABLE t1 (a char(16)) character set cp1250 collate cp1250_czech_cs; +INSERT INTO t1 VALUES (''); +SELECT a, length(a), a='', a=' ', a=' ' FROM t1; +a length(a) a='' a=' ' a=' ' + 0 1 1 1 +DROP TABLE t1; diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result index 0779e2adfa2..e426f0cfc08 100644 --- a/mysql-test/r/grant2.result +++ b/mysql-test/r/grant2.result @@ -233,3 +233,19 @@ drop user mysqltest_B@'%'; ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysql' drop user mysqltest_B@'%'; drop user mysqltest_3@localhost; +create database mysqltest_1; +create table mysqltest_1.t1 (i int); +insert into mysqltest_1.t1 values (1),(2),(3); +GRANT ALL ON mysqltest_1.t1 TO mysqltest_1@'127.0.0.0/255.0.0.0'; +show grants for current_user(); +Grants for mysqltest_1@127.0.0.0/255.0.0.0 +GRANT USAGE ON *.* TO 'mysqltest_1'@'127.0.0.0/255.0.0.0' +GRANT ALL PRIVILEGES ON `mysqltest_1`.`t1` TO 'mysqltest_1'@'127.0.0.0/255.0.0.0' +select * from t1; +i +1 +2 +3 +REVOKE ALL ON mysqltest_1.t1 FROM mysqltest_1@'127.0.0.0/255.0.0.0'; +drop table mysqltest_1.t1; +drop database mysqltest_1; diff --git a/mysql-test/r/have_cp1250_ch.require b/mysql-test/r/have_cp1250_ch.require new file mode 100644 index 00000000000..2eb834d97e2 --- /dev/null +++ b/mysql-test/r/have_cp1250_ch.require @@ -0,0 +1,2 @@ +Collation Charset Id Default Compiled Sortlen +cp1250_czech_cs cp1250 34 Yes 2 diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index d8d9e60acd1..17c0f32d666 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -479,27 +479,6 @@ CREATE TABLE `t1` ( /*!40000 ALTER TABLE `t1` DISABLE KEYS */; LOCK TABLES `t1` WRITE; -INSERT INTO `t1` VALUES ('ÄÖÜß'); -UNLOCK TABLES; -/*!40000 ALTER TABLE `t1` ENABLE KEYS */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -DROP TABLE IF EXISTS `t1`; -CREATE TABLE `t1` ( - `a` char(10) default NULL -) TYPE=MyISAM; - - -/*!40000 ALTER TABLE `t1` DISABLE KEYS */; -LOCK TABLES `t1` WRITE; INSERT INTO `t1` VALUES ('Ž™šá'); UNLOCK TABLES; /*!40000 ALTER TABLE `t1` ENABLE KEYS */; diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 8aa20a88177..b36020bc2a3 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -93,3 +93,15 @@ t1 CREATE TABLE `t1` ( `b` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test index c509a4113f4..a26b78254e7 100644 --- a/mysql-test/t/bigint.test +++ b/mysql-test/t/bigint.test @@ -71,3 +71,36 @@ drop table t1; # atof() behaviour is different of different systems. to be fixed in 4.1 SELECT '0x8000000000000001'+0; +# Test for BUG#8562: joins over BIGINT UNSIGNED value + constant propagation +create table t1 ( + value64 bigint unsigned not null, + value32 integer not null, + primary key(value64, value32) +); + +create table t2 ( + value64 bigint unsigned not null, + value32 integer not null, + primary key(value64, value32) +); + +insert into t1 values(17156792991891826145, 1); +insert into t1 values( 9223372036854775807, 2); +insert into t2 values(17156792991891826145, 3); +insert into t2 values( 9223372036854775807, 4); + +select * from t1; +select * from t2; + +select * from t1, t2 where t1.value64=17156792991891826145 and +t2.value64=17156792991891826145; +select * from t1, t2 where t1.value64=17156792991891826145 and +t2.value64=t1.value64; + +select * from t1, t2 where t1.value64= 9223372036854775807 and +t2.value64=9223372036854775807; +select * from t1, t2 where t1.value64= 9223372036854775807 and +t2.value64=t1.value64; + +drop table t1, t2; + diff --git a/mysql-test/t/ctype_cp1250_ch.test b/mysql-test/t/ctype_cp1250_ch.test new file mode 100644 index 00000000000..06aea7b9979 --- /dev/null +++ b/mysql-test/t/ctype_cp1250_ch.test @@ -0,0 +1,12 @@ +-- source include/have_cp1250_ch.inc + +SHOW COLLATION LIKE 'cp1250_czech_cs'; + +# +# Bugs: #8840: Empty string comparison and character set 'cp1250' +# + +CREATE TABLE t1 (a char(16)) character set cp1250 collate cp1250_czech_cs; +INSERT INTO t1 VALUES (''); +SELECT a, length(a), a='', a=' ', a=' ' FROM t1; +DROP TABLE t1; diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test index d0778d4c082..7e2ac5b4008 100644 --- a/mysql-test/t/grant2.test +++ b/mysql-test/t/grant2.test @@ -246,3 +246,17 @@ connection default; drop user mysqltest_B@'%'; drop user mysqltest_3@localhost; # +# Bug #3309: Test IP addresses with netmask +create database mysqltest_1; +create table mysqltest_1.t1 (i int); +insert into mysqltest_1.t1 values (1),(2),(3); +GRANT ALL ON mysqltest_1.t1 TO mysqltest_1@'127.0.0.0/255.0.0.0'; +connect (n1,127.0.0.1,mysqltest_1,,mysqltest_1,$MASTER_MYPORT,$MASTER_MYSOCK); +connection n1; +show grants for current_user(); +select * from t1; +disconnect n1; +connection default; +REVOKE ALL ON mysqltest_1.t1 FROM mysqltest_1@'127.0.0.0/255.0.0.0'; +drop table mysqltest_1.t1; +drop database mysqltest_1; diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 3f19c7f0c52..43599e3b3a9 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -158,7 +158,14 @@ drop database mysqldump_test_db; CREATE TABLE t1 (a CHAR(10)); INSERT INTO t1 VALUES (_latin1 'ÄÖÜß'); --exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments test t1 ---exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 test t1 +# +# Bug#8063: make test mysqldump [ fail ] +# We cannot tes this command because its output depends +# on --default-character-set incompiled into "mysqldump" program. +# If the future we can move this command into a separate test with +# checking that "mysqldump" is compiled with "latin1" +# +#--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 test t1 --exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 --default-character-set=cp850 test t1 --exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=cp850 --compatible=mysql323 test t1 --exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test t1 diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index 7fb7e81b3b1..f477fc378c6 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -121,3 +121,18 @@ eval alter table t1 index directory="$MYSQL_TEST_DIR/var/log"; enable_query_log; show create table t1; drop table t1; + +# +# Test specifying DATA DIRECTORY that is the same as what would normally +# have been chosen. (Bug #8707) +# +disable_query_log; +eval create table t1 (i int) data directory = "$MYSQL_TEST_DIR/var/master-data/test/"; +enable_query_log; +show create table t1; +drop table t1; +disable_query_log; +eval create table t1 (i int) index directory = "$MYSQL_TEST_DIR/var/master-data/test/"; +enable_query_log; +show create table t1; +drop table t1; |