mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merged from mysql-4.1 to mysql-5.0
client/mysqltest.c: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/t/ndb_autodiscover.test: Auto merged sql/ha_ndbcluster.h: Auto merged sql/item_strfunc.cc: Auto merged client/mysqldump.c: Merge from 4.1 to 5.0 mysql-test/r/ndb_autodiscover.result: Merge ndb/test/ndbapi/create_tab.cpp: Merge sql/ha_ndbcluster.cc: Merge sql/handler.cc: Merge sql/handler.h: Merge sql/sql_base.cc: Merge sql/sql_table.cc: Merge
This commit is contained in:
4
mysql-test/include/not_openssl.inc
Normal file
4
mysql-test/include/not_openssl.inc
Normal file
@ -0,0 +1,4 @@
|
||||
-- require r/not_openssl.require
|
||||
disable_query_log;
|
||||
show variables like "have_openssl";
|
||||
enable_query_log;
|
@ -707,6 +707,9 @@ MYSQL_CLIENT_TEST="$MYSQL_CLIENT_TEST --no-defaults --testcase --user=root --soc
|
||||
if [ "x$USE_EMBEDDED_SERVER" = "x1" ]; then
|
||||
MYSQL_CLIENT_TEST="$MYSQL_CLIENT_TEST -A --language=$LANGUAGE -A --datadir=$SLAVE_MYDDIR -A --character-sets-dir=$CHARSETSDIR"
|
||||
fi
|
||||
# Save path and name of mysqldump
|
||||
MYSQL_DUMP_DIR="$MYSQL_DUMP"
|
||||
export MYSQL_DUMP_DIR
|
||||
MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
|
||||
MYSQL_SHOW="$MYSQL_SHOW -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSHOW_OPT"
|
||||
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT"
|
||||
|
@ -120,6 +120,60 @@ hello
|
||||
select des_decrypt(des_encrypt("hello",4),'password4');
|
||||
des_decrypt(des_encrypt("hello",4),'password4')
|
||||
hello
|
||||
select des_encrypt("hello",10);
|
||||
des_encrypt("hello",10)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1108 Incorrect parameters to procedure 'des_encrypt'
|
||||
select des_encrypt(NULL);
|
||||
des_encrypt(NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1108 Incorrect parameters to procedure 'des_encrypt'
|
||||
select des_encrypt(NULL, 10);
|
||||
des_encrypt(NULL, 10)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1108 Incorrect parameters to procedure 'des_encrypt'
|
||||
select des_encrypt(NULL, NULL);
|
||||
des_encrypt(NULL, NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1108 Incorrect parameters to procedure 'des_encrypt'
|
||||
select des_encrypt(10, NULL);
|
||||
des_encrypt(10, NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1108 Incorrect parameters to procedure 'des_encrypt'
|
||||
select des_encrypt("hello", NULL);
|
||||
des_encrypt("hello", NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1108 Incorrect parameters to procedure 'des_encrypt'
|
||||
select des_decrypt("hello",10);
|
||||
des_decrypt("hello",10)
|
||||
hello
|
||||
select des_decrypt(NULL);
|
||||
des_decrypt(NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1108 Incorrect parameters to procedure 'des_decrypt'
|
||||
select des_decrypt(NULL, 10);
|
||||
des_decrypt(NULL, 10)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1108 Incorrect parameters to procedure 'des_decrypt'
|
||||
select des_decrypt(NULL, NULL);
|
||||
des_decrypt(NULL, NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1108 Incorrect parameters to procedure 'des_decrypt'
|
||||
select des_decrypt(10, NULL);
|
||||
des_decrypt(10, NULL)
|
||||
10
|
||||
select des_decrypt("hello", NULL);
|
||||
des_decrypt("hello", NULL)
|
||||
hello
|
||||
SET @a=des_decrypt(des_encrypt("hello"));
|
||||
flush des_key_file;
|
||||
select @a = des_decrypt(des_encrypt("hello"));
|
||||
@ -134,6 +188,8 @@ NULL
|
||||
select hex(des_decrypt(des_encrypt("hello","hidden")));
|
||||
hex(des_decrypt(des_encrypt("hello","hidden")))
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1108 Incorrect parameters to procedure 'des_decrypt'
|
||||
explain extended select des_decrypt(des_encrypt("hello",4),'password2'), des_decrypt(des_encrypt("hello","hidden"));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
|
93
mysql-test/r/func_encrypt_nossl.result
Normal file
93
mysql-test/r/func_encrypt_nossl.result
Normal file
@ -0,0 +1,93 @@
|
||||
select des_encrypt("test", 'akeystr');
|
||||
des_encrypt("test", 'akeystr')
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select des_encrypt("test", 1);
|
||||
des_encrypt("test", 1)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select des_encrypt("test", 9);
|
||||
des_encrypt("test", 9)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select des_encrypt("test", 100);
|
||||
des_encrypt("test", 100)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select des_encrypt("test", NULL);
|
||||
des_encrypt("test", NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select des_decrypt("test", 'anotherkeystr');
|
||||
des_decrypt("test", 'anotherkeystr')
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select des_decrypt(1, 1);
|
||||
des_decrypt(1, 1)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select des_decrypt(des_encrypt("test", 'thekey'));
|
||||
des_decrypt(des_encrypt("test", 'thekey'))
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello"));
|
||||
hex(des_encrypt("hello")) des_decrypt(des_encrypt("hello"))
|
||||
NULL NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select des_decrypt(des_encrypt("hello",4));
|
||||
des_decrypt(des_encrypt("hello",4))
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select des_decrypt(des_encrypt("hello",'test'),'test');
|
||||
des_decrypt(des_encrypt("hello",'test'),'test')
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password'));
|
||||
hex(des_encrypt("hello")) hex(des_encrypt("hello",5)) hex(des_encrypt("hello",'default_password'))
|
||||
NULL NULL NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select des_decrypt(des_encrypt("hello"),'default_password');
|
||||
des_decrypt(des_encrypt("hello"),'default_password')
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select des_decrypt(des_encrypt("hello",4),'password4');
|
||||
des_decrypt(des_encrypt("hello",4),'password4')
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
SET @a=des_decrypt(des_encrypt("hello"));
|
||||
Warnings:
|
||||
Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
flush des_key_file;
|
||||
select @a = des_decrypt(des_encrypt("hello"));
|
||||
@a = des_decrypt(des_encrypt("hello"))
|
||||
NULL
|
||||
select hex("hello");
|
||||
hex("hello")
|
||||
68656C6C6F
|
||||
select hex(des_decrypt(des_encrypt("hello",4),'password2'));
|
||||
hex(des_decrypt(des_encrypt("hello",4),'password2'))
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
||||
select hex(des_decrypt(des_encrypt("hello","hidden")));
|
||||
hex(des_decrypt(des_encrypt("hello","hidden")))
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working
|
@ -1,7 +1,4 @@
|
||||
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa;
|
||||
drop database if exists mysqldump_test_db;
|
||||
drop database if exists db1;
|
||||
drop view if exists v1, v2;
|
||||
DROP TABLE IF EXISTS t1, `"t"1`;
|
||||
CREATE TABLE t1(a int);
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
<?xml version="1.0"?>
|
||||
@ -21,18 +18,16 @@ INSERT INTO t1 VALUES (1), (2);
|
||||
</database>
|
||||
</mysqldump>
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a decimal(64, 20));
|
||||
CREATE TABLE t1 (a decimal(240, 20));
|
||||
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
||||
("0987654321098765432109876543210987654321");
|
||||
CREATE TABLE `t1` (
|
||||
`a` decimal(64,20) default NULL
|
||||
`a` decimal(240,20) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('987654321098765432109876543210987654321.00000000000000000000');
|
||||
INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('0987654321098765432109876543210987654321.00000000000000000000');
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a double);
|
||||
INSERT INTO t1 VALUES ('-9e999999');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value adjusted for column 'a' at row 1
|
||||
INSERT INTO t1 VALUES (-9e999999);
|
||||
CREATE TABLE `t1` (
|
||||
`a` double default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
@ -113,7 +108,7 @@ INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
|
||||
<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="c" Type="char(3)" Null="YES" Key="" Extra="" />
|
||||
</table_structure>
|
||||
<table_data name="t1">
|
||||
<row>
|
||||
@ -357,41 +352,6 @@ CREATE TABLE `t1` (
|
||||
2
|
||||
3
|
||||
drop table t1;
|
||||
create table t1(a int);
|
||||
create view v1 as select * from t1;
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!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' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
||||
LOCK TABLES `t1` WRITE;
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||
DROP TABLE IF EXISTS `v1`;
|
||||
DROP VIEW IF EXISTS `v1`;
|
||||
CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1`;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
@ -600,8 +560,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a char(10));
|
||||
INSERT INTO t1 VALUES ('\'');
|
||||
CREATE TABLE t1 (a decimal(240, 20));
|
||||
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
||||
("0987654321098765432109876543210987654321");
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
@ -613,46 +574,13 @@ INSERT INTO t1 VALUES ('\'');
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a` char(10) default NULL
|
||||
`a` decimal(240,20) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
|
||||
/*!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 */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
INSERT INTO t1 VALUES (4),(5),(6);
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!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' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
||||
LOCK TABLES `t1` WRITE;
|
||||
INSERT IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6);
|
||||
INSERT IGNORE INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('0987654321098765432109876543210987654321.00000000000000000000');
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||
|
||||
@ -675,14 +603,12 @@ UNLOCK TABLES;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
`a` decimal(240,20) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
||||
LOCK TABLES `t1` WRITE;
|
||||
INSERT IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6);
|
||||
UNLOCK TABLES;
|
||||
INSERT DELAYED IGNORE INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('0987654321098765432109876543210987654321.00000000000000000000');
|
||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
@ -1423,18 +1349,12 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
create database db1;
|
||||
use db1;
|
||||
CREATE TABLE t2 (
|
||||
a varchar(30) default NULL,
|
||||
KEY a (a(5))
|
||||
);
|
||||
INSERT INTO t2 VALUES ('alfred');
|
||||
INSERT INTO t2 VALUES ('angie');
|
||||
INSERT INTO t2 VALUES ('bingo');
|
||||
INSERT INTO t2 VALUES ('waffle');
|
||||
INSERT INTO t2 VALUES ('lemon');
|
||||
create view v2 as select * from t2 where a like 'a%' with check option;
|
||||
CREATE DATABASE mysqldump_test_db;
|
||||
USE mysqldump_test_db;
|
||||
CREATE TABLE t1 ( a INT );
|
||||
CREATE TABLE t2 ( a INT );
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
INSERT INTO t2 VALUES (1), (2);
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
@ -1444,22 +1364,15 @@ create view v2 as select * from t2 where a like 'a%' with check option;
|
||||
/*!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' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
DROP TABLE IF EXISTS `t2`;
|
||||
CREATE TABLE `t2` (
|
||||
`a` varchar(30) default NULL,
|
||||
KEY `a` (`a`(5))
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
|
||||
LOCK TABLES `t2` WRITE;
|
||||
INSERT INTO `t2` VALUES ('alfred'),('angie'),('bingo'),('waffle'),('lemon');
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
|
||||
DROP TABLE IF EXISTS `v2`;
|
||||
DROP VIEW IF EXISTS `v2`;
|
||||
CREATE ALGORITHM=UNDEFINED VIEW `db1`.`v2` AS select `db1`.`t2`.`a` AS `a` from `db1`.`t2` where (`db1`.`t2`.`a` like _latin1'a%') WITH CASCADED CHECK OPTION;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
@ -1468,6 +1381,58 @@ CREATE ALGORITHM=UNDEFINED VIEW `db1`.`v2` AS select `db1`.`t2`.`a` AS `a` from
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop table t2;
|
||||
drop view v2;
|
||||
drop database db1;
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!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' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
DROP TABLE IF EXISTS `t2`;
|
||||
CREATE TABLE `t2` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
DROP DATABASE mysqldump_test_db;
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1(a varchar(30) primary key, b int not null);
|
||||
create table t2(a varchar(30) primary key, b int not null);
|
||||
create table t3(a varchar(30) primary key, b int not null);
|
||||
test_sequence
|
||||
------ Testing with illegal table names ------
|
||||
MYSQL_DUMP_DIR: Couldn't find table: "\d-2-1.sql"
|
||||
|
||||
MYSQL_DUMP_DIR: Couldn't find table: "\t1"
|
||||
|
||||
MYSQL_DUMP_DIR: Couldn't find table: "\t1"
|
||||
|
||||
MYSQL_DUMP_DIR: Couldn't find table: "\\t1"
|
||||
|
||||
MYSQL_DUMP_DIR: Couldn't find table: "t\1"
|
||||
|
||||
MYSQL_DUMP_DIR: Couldn't find table: "t\1"
|
||||
|
||||
MYSQL_DUMP_DIR: Couldn't find table: "t/1"
|
||||
|
||||
test_sequence
|
||||
------ Testing with illegal database names ------
|
||||
MYSQL_DUMP_DIR: Got error: 1049: Unknown database 'mysqldump_test_d' when selecting the database
|
||||
MYSQL_DUMP_DIR: Got error: 1102: Incorrect database name 'mysqld\ump_test_db' when selecting the database
|
||||
drop table t1, t2, t3;
|
||||
drop database mysqldump_test_db;
|
||||
|
@ -93,7 +93,7 @@ name char(20), a int, b float, c char(24)
|
||||
ERROR 42S01: Table 't3' already exists
|
||||
show status like 'handler_discover%';
|
||||
Variable_name Value
|
||||
Handler_discover 1
|
||||
Handler_discover 0
|
||||
create table IF NOT EXISTS t3(
|
||||
id int not null primary key,
|
||||
id2 int not null,
|
||||
@ -101,7 +101,7 @@ name char(20)
|
||||
) engine=ndb;
|
||||
show status like 'handler_discover%';
|
||||
Variable_name Value
|
||||
Handler_discover 2
|
||||
Handler_discover 0
|
||||
SHOW CREATE TABLE t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
@ -114,7 +114,7 @@ id name
|
||||
1 Explorer
|
||||
show status like 'handler_discover%';
|
||||
Variable_name Value
|
||||
Handler_discover 2
|
||||
Handler_discover 1
|
||||
drop table t3;
|
||||
flush status;
|
||||
create table t7(
|
||||
@ -373,6 +373,20 @@ use test2;
|
||||
drop table t2;
|
||||
drop database test2;
|
||||
use test;
|
||||
CREATE TABLE sys.SYSTAB_0 (a int);
|
||||
ERROR 42S01: Table 'SYSTAB_0' already exists
|
||||
select * from sys.SYSTAB_0;
|
||||
ERROR HY000: Failed to open 'SYSTAB_0', error while unpacking from engine
|
||||
CREATE TABLE IF NOT EXISTS sys.SYSTAB_0 (a int);
|
||||
show warnings;
|
||||
Level Code Message
|
||||
select * from sys.SYSTAB_0;
|
||||
ERROR HY000: Failed to open 'SYSTAB_0', error while unpacking from engine
|
||||
drop table sys.SYSTAB_0;
|
||||
ERROR 42S02: Unknown table 'SYSTAB_0'
|
||||
drop table IF EXISTS sys.SYSTAB_0;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'SYSTAB_0'
|
||||
drop database if exists test_only_ndb_tables;
|
||||
create database test_only_ndb_tables;
|
||||
use test_only_ndb_tables;
|
||||
|
2
mysql-test/r/not_openssl.require
Normal file
2
mysql-test/r/not_openssl.require
Normal file
@ -0,0 +1,2 @@
|
||||
Variable_name Value
|
||||
have_openssl NO
|
@ -59,6 +59,22 @@ select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("he
|
||||
select des_decrypt(des_encrypt("hello"),'default_password');
|
||||
select des_decrypt(des_encrypt("hello",4),'password4');
|
||||
|
||||
# Test use of invalid parameters
|
||||
select des_encrypt("hello",10);
|
||||
select des_encrypt(NULL);
|
||||
select des_encrypt(NULL, 10);
|
||||
select des_encrypt(NULL, NULL);
|
||||
select des_encrypt(10, NULL);
|
||||
select des_encrypt("hello", NULL);
|
||||
|
||||
select des_decrypt("hello",10);
|
||||
select des_decrypt(NULL);
|
||||
select des_decrypt(NULL, 10);
|
||||
select des_decrypt(NULL, NULL);
|
||||
select des_decrypt(10, NULL);
|
||||
select des_decrypt("hello", NULL);
|
||||
|
||||
|
||||
# Test flush
|
||||
SET @a=des_decrypt(des_encrypt("hello"));
|
||||
flush des_key_file;
|
||||
|
36
mysql-test/t/func_encrypt_nossl.test
Normal file
36
mysql-test/t/func_encrypt_nossl.test
Normal file
@ -0,0 +1,36 @@
|
||||
-- source include/not_openssl.inc
|
||||
|
||||
#
|
||||
# Test output from des_encrypt and des_decrypt when server is
|
||||
# compiled without openssl suuport
|
||||
#
|
||||
select des_encrypt("test", 'akeystr');
|
||||
select des_encrypt("test", 1);
|
||||
select des_encrypt("test", 9);
|
||||
select des_encrypt("test", 100);
|
||||
select des_encrypt("test", NULL);
|
||||
select des_decrypt("test", 'anotherkeystr');
|
||||
select des_decrypt(1, 1);
|
||||
select des_decrypt(des_encrypt("test", 'thekey'));
|
||||
|
||||
|
||||
#
|
||||
# Test default keys
|
||||
#
|
||||
select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello"));
|
||||
select des_decrypt(des_encrypt("hello",4));
|
||||
select des_decrypt(des_encrypt("hello",'test'),'test');
|
||||
select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password'));
|
||||
select des_decrypt(des_encrypt("hello"),'default_password');
|
||||
select des_decrypt(des_encrypt("hello",4),'password4');
|
||||
|
||||
# Test flush
|
||||
SET @a=des_decrypt(des_encrypt("hello"));
|
||||
flush des_key_file;
|
||||
select @a = des_decrypt(des_encrypt("hello"));
|
||||
|
||||
# Test usage of wrong password
|
||||
select hex("hello");
|
||||
select hex(des_decrypt(des_encrypt("hello",4),'password2'));
|
||||
select hex(des_decrypt(des_encrypt("hello","hidden")));
|
||||
|
@ -2,10 +2,7 @@
|
||||
--source include/not_embedded.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa;
|
||||
drop database if exists mysqldump_test_db;
|
||||
drop database if exists db1;
|
||||
drop view if exists v1, v2;
|
||||
DROP TABLE IF EXISTS t1, `"t"1`;
|
||||
--enable_warnings
|
||||
|
||||
# XML output
|
||||
@ -19,7 +16,7 @@ DROP TABLE t1;
|
||||
# Bug #2005
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a decimal(64, 20));
|
||||
CREATE TABLE t1 (a decimal(240, 20));
|
||||
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
||||
("0987654321098765432109876543210987654321");
|
||||
--exec $MYSQL_DUMP --compact test t1
|
||||
@ -30,7 +27,7 @@ DROP TABLE t1;
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a double);
|
||||
INSERT INTO t1 VALUES ('-9e999999');
|
||||
INSERT INTO t1 VALUES (-9e999999);
|
||||
# The following replaces is here because some systems replaces the above
|
||||
# double with '-inf' and others with MAX_DOUBLE
|
||||
--replace_result (-1.79769313486232e+308) (RES) (NULL) (RES)
|
||||
@ -134,15 +131,6 @@ insert into t1 values (1),(2),(3);
|
||||
--exec rm $MYSQL_TEST_DIR/var/tmp/t1.txt
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# dump of view
|
||||
#
|
||||
create table t1(a int);
|
||||
create view v1 as select * from t1;
|
||||
--exec $MYSQL_DUMP --skip-comments test
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #6101: create database problem
|
||||
#
|
||||
@ -197,24 +185,15 @@ INSERT INTO `t1` VALUES (0x602010000280100005E71A);
|
||||
--exec $MYSQL_DUMP --skip-extended-insert --hex-blob test --skip-comments t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #9756
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a char(10));
|
||||
INSERT INTO t1 VALUES ('\'');
|
||||
--exec $MYSQL_DUMP --skip-comments test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Test for --insert-ignore
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
INSERT INTO t1 VALUES (4),(5),(6);
|
||||
--exec $MYSQL_DUMP --skip-comments --insert-ignore test t1
|
||||
--exec $MYSQL_DUMP --skip-comments --insert-ignore --delayed-insert test t1
|
||||
CREATE TABLE t1 (a decimal(240, 20));
|
||||
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
||||
("0987654321098765432109876543210987654321");
|
||||
--exec $MYSQL_DUMP --insert-ignore --skip-comments test t1
|
||||
--exec $MYSQL_DUMP --insert-ignore --skip-comments --delayed-insert test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
@ -565,26 +544,95 @@ INSERT INTO t1 VALUES (1),(2),(3);
|
||||
--exec $MYSQL_DUMP --add-drop-database --skip-comments --databases test
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
#
|
||||
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||
# Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
|
||||
#
|
||||
|
||||
create database db1;
|
||||
use db1;
|
||||
CREATE DATABASE mysqldump_test_db;
|
||||
USE mysqldump_test_db;
|
||||
CREATE TABLE t1 ( a INT );
|
||||
CREATE TABLE t2 ( a INT );
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
INSERT INTO t2 VALUES (1), (2);
|
||||
--exec $MYSQL_DUMP --skip-comments --no-data mysqldump_test_db
|
||||
--exec $MYSQL_DUMP --skip-comments --no-data mysqldump_test_db t1 t2
|
||||
DROP TABLE t1, t2;
|
||||
DROP DATABASE mysqldump_test_db;
|
||||
|
||||
#
|
||||
# Testing with tables and databases that don't exists
|
||||
# or contains illegal characters
|
||||
# (Bug #9358 mysqldump crashes if tablename starts with \)
|
||||
#
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1(a varchar(30) primary key, b int not null);
|
||||
create table t2(a varchar(30) primary key, b int not null);
|
||||
create table t3(a varchar(30) primary key, b int not null);
|
||||
|
||||
--disable_query_log
|
||||
select '------ Testing with illegal table names ------' as test_sequence ;
|
||||
--enable_query_log
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\d-2-1.sql" 2>&1
|
||||
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\t1" 2>&1
|
||||
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\t1" 2>&1
|
||||
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\\\t1" 2>&1
|
||||
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t\1" 2>&1
|
||||
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t\\1" 2>&1
|
||||
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t/1" 2>&1
|
||||
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T_1"
|
||||
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T%1"
|
||||
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T'1"
|
||||
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T_1"
|
||||
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T_"
|
||||
|
||||
--disable_query_log
|
||||
select '------ Testing with illegal database names ------' as test_sequence ;
|
||||
--enable_query_log
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 2
|
||||
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_d 2>&1
|
||||
|
||||
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
|
||||
--error 2
|
||||
--exec $MYSQL_DUMP --compact --skip-comments "mysqld\ump_test_db" 2>&1
|
||||
|
||||
drop table t1, t2, t3;
|
||||
drop database mysqldump_test_db;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
a varchar(30) default NULL,
|
||||
KEY a (a(5))
|
||||
);
|
||||
|
||||
INSERT INTO t2 VALUES ('alfred');
|
||||
INSERT INTO t2 VALUES ('angie');
|
||||
INSERT INTO t2 VALUES ('bingo');
|
||||
INSERT INTO t2 VALUES ('waffle');
|
||||
INSERT INTO t2 VALUES ('lemon');
|
||||
create view v2 as select * from t2 where a like 'a%' with check option;
|
||||
--exec $MYSQL_DUMP --skip-comments db1
|
||||
drop table t2;
|
||||
drop view v2;
|
||||
drop database db1;
|
||||
|
@ -494,6 +494,27 @@ select * from t1;
|
||||
use test;
|
||||
drop database test_only_ndb_tables;
|
||||
|
||||
#####################################################
|
||||
# Test that it's not possible to create tables
|
||||
# with same name as NDB internal tables
|
||||
# This will also test that it's not possible to create
|
||||
# a table with tha same name as a table that can't be
|
||||
# discovered( for example a table created via NDBAPI)
|
||||
|
||||
--error 1050
|
||||
CREATE TABLE sys.SYSTAB_0 (a int);
|
||||
--error 1105
|
||||
select * from sys.SYSTAB_0;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS sys.SYSTAB_0 (a int);
|
||||
show warnings;
|
||||
--error 1105
|
||||
select * from sys.SYSTAB_0;
|
||||
|
||||
--error 1051
|
||||
drop table sys.SYSTAB_0;
|
||||
drop table IF EXISTS sys.SYSTAB_0;
|
||||
|
||||
######################################################
|
||||
# Note! This should always be the last step in this
|
||||
# file, the table t9 will be used and dropped
|
||||
|
Reference in New Issue
Block a user