1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge trift2.:/MySQL/M51/mysql-5.1

into  trift2.:/MySQL/M51/push-5.1


configure.in:
  Auto merged
mysql-test/r/federated.result:
  Auto merged
mysql-test/t/federated.test:
  Auto merged
This commit is contained in:
unknown
2008-03-27 12:45:16 +01:00
357 changed files with 25830 additions and 75187 deletions

View File

@ -168,4 +168,19 @@ DROP DATABASE mysql_test;
###########################################################################
--echo
#
# Bug#26703: DROP DATABASE fails if database contains a #mysql50# table with backticks
#
create database mysqltestbug26703;
use mysqltestbug26703;
create table `#mysql50#abc``def` ( id int );
--error ER_WRONG_TABLE_NAME
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
--error ER_WRONG_TABLE_NAME
create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
use test;
drop database mysqltestbug26703;
--echo End of 5.1 tests

View File

@ -6,6 +6,9 @@ connection slave;
DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
`a\\b` int NOT NULL default 0,
`a\\` int NOT NULL default 0,
`name` varchar(32) NOT NULL default ''
)
DEFAULT CHARSET=latin1;
@ -16,6 +19,9 @@ DROP TABLE IF EXISTS federated.t1;
--error 1432
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
`a\\b` inT NOT NULL default 0,
`a\\` int NOT NULL default 0,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
@ -25,6 +31,9 @@ CREATE TABLE federated.t1 (
--error 1432
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
`a\\b` iNt NOT NULL default 0,
`a\\` int NOT NULL default 0,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
@ -34,6 +43,9 @@ CREATE TABLE federated.t1 (
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
`a\\\\b` iNT NOT NULL default 0,
`a\\\\` int NOT NULL default 0,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
@ -46,6 +58,9 @@ DROP TABLE federated.t1;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
`a\\\\b` Int NOT NULL default 0,
`a\\\\` int NOT NULL default 0,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
@ -58,6 +73,9 @@ DROP TABLE federated.t1;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
`a\\\\b` InT NOT NULL default 0,
`a\\\\` int NOT NULL default 0,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
@ -65,6 +83,9 @@ eval CREATE TABLE federated.t1 (
INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t1 (id, name) VALUES (2, 'fee');
INSERT INTO federated.t1 (id, `group`) VALUES (3, 42);
INSERT INTO federated.t1 (id, `a\\b`) VALUES (4, 23);
INSERT INTO federated.t1 (id, `a\\`) VALUES (5, 1);
SELECT * FROM federated.t1;
DELETE FROM federated.t1;

View File

@ -1400,4 +1400,66 @@ DROP USER mysqltest_1@localhost;
FLUSH PRIVILEGES;
#
# Bug#33464: DROP FUNCTION caused a crash.
#
CREATE DATABASE dbbug33464;
CREATE USER 'userbug33464'@'localhost';
GRANT CREATE ROUTINE ON dbbug33464.* TO 'userbug33464'@'localhost';
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (connbug33464, localhost, userbug33464, , dbbug33464);
--source suite/funcs_1/include/show_connection.inc
--disable_warnings
DROP PROCEDURE IF EXISTS sp3;
DROP FUNCTION IF EXISTS fn1;
--enable_warnings
delimiter //;
CREATE PROCEDURE sp3(v1 char(20))
BEGIN
SELECT * from dbbug33464.t6 where t6.f2= 'xyz';
END//
delimiter ;//
delimiter //;
CREATE FUNCTION fn1() returns char(50) SQL SECURITY INVOKER
BEGIN
return 1;
END//
delimiter ;//
delimiter //;
CREATE FUNCTION fn2() returns char(50) SQL SECURITY DEFINER
BEGIN
return 2;
END//
delimiter ;//
disconnect connbug33464;
# cleanup
connection default;
USE dbbug33464;
--source suite/funcs_1/include/show_connection.inc
SELECT fn1();
SELECT fn2();
--error 0, ER_CANNOT_USER
DROP USER 'userbug33464'@'localhost';
DROP FUNCTION fn1;
DROP FUNCTION fn2;
DROP PROCEDURE sp3;
--error 0, ER_CANNOT_USER
DROP USER 'userbug33464'@'localhost';
use test;
DROP DATABASE dbbug33464;
--echo End of 5.1 tests

View File

@ -2436,6 +2436,29 @@ select table_comment, data_free > 0 as data_free_is_set
where table_schema='test' and table_name = 't1';
drop table t1;
#
# Bug 34920 test
#
CONNECTION default;
CREATE TABLE t1 (
c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
c2 VARCHAR(128) NOT NULL,
PRIMARY KEY(c1)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=100;
CREATE TABLE t2 (
c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
c2 INT(10) UNSIGNED DEFAULT NULL,
PRIMARY KEY(c1)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=200;
SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2';
ALTER TABLE t2 ADD CONSTRAINT t1_t2_1 FOREIGN KEY(c1) REFERENCES t1(c1);
SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2';
DROP TABLE t2;
DROP TABLE t1;
# End 34920 test
#######################################################################
# #
# Please, DO NOT TOUCH this file as well as the innodb.result file. #