Commit 01df5a15 authored by unknown's avatar unknown

Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0

into krsna.:/home/patg/test/mysql-5.0


BitKeeper/etc/logging_ok:
  auto-union
parents 1defb94d 2b1a8acd
...@@ -182,6 +182,7 @@ ndbdev@shark. ...@@ -182,6 +182,7 @@ ndbdev@shark.
nick@mysql.com nick@mysql.com
nick@nick.leippe.com nick@nick.leippe.com
papa@gbichot.local papa@gbichot.local
patg@krsna.
patg@krsna.patg.net patg@krsna.patg.net
patg@patrick-galbraiths-computer.local patg@patrick-galbraiths-computer.local
patg@pc248.lfp.kcls.org patg@pc248.lfp.kcls.org
......
...@@ -8,6 +8,120 @@ stop slave; ...@@ -8,6 +8,120 @@ stop slave;
DROP DATABASE IF EXISTS federated; DROP DATABASE IF EXISTS federated;
CREATE DATABASE federated; CREATE DATABASE federated;
CREATE TABLE federated.t1 ( CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
DEFAULT CHARSET=latin1;
DROP DATABASE IF EXISTS federated;
CREATE DATABASE federated;
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:@/too/many/items/federated/t1';
ERROR HY000: Can't create table 'this connection string is not in the correct format!
' (errno: 0)
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1';
ERROR HY000: Can't create table 'this connection string is not in the correct format!
' (errno: 0)
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t3';
ERROR HY000: Error running query on master: foreign table 't3' does not exist!
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://user:pass@127.0.0.1:SLAVE_PORT/federated/t1';
ERROR 08S01: Error connecting to master: unable to connect to database 'federated' on host '127.0.0.1 as user 'user' !
DROP TABLE IF EXISTS federated.t1;
Warnings:
Note 1051 Unknown table 't1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t1 (id, name) VALUES (2, 'fee');
SELECT * FROM federated.t1;
id name
1 foo
2 fee
DELETE FROM federated.t1;
DROP TABLE federated.t1;
DROP TABLE IF EXISTS federated.t2;
Warnings:
Note 1051 Unknown table 't2'
CREATE TABLE federated.t2 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t2 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t2 (id, name) VALUES (2, 'fee');
SELECT * FROM federated.t2;
id name
1 foo
2 fee
DROP TABLE federated.t2;
DROP TABLE IF EXISTS federated.t1;
DROP TABLE IF EXISTS federated.`t1%`;
Warnings:
Note 1051 Unknown table 't1%'
CREATE TABLE federated.`t1%` (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS federated.t1;
Warnings:
Note 1051 Unknown table 't1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1%';
INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t1 (id, name) VALUES (2, 'fee');
SELECT * FROM federated.t1;
id name
1 foo
2 fee
DELETE FROM federated.t1;
DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.`t1%` (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:9308/federated/t1%';
INSERT INTO federated.`t1%` (id, name) VALUES (1, 'foo');
INSERT INTO federated.`t1%` (id, name) VALUES (2, 'fee');
SELECT * FROM federated.`t1%`;
id name
1 foo
2 fee
DELETE FROM federated.`t1%`;
DROP TABLE IF EXISTS federated.`t1%`;
DROP TABLE IF EXISTS federated.`t1%`;
DROP TABLE IF EXISTS federated.t1;
Warnings:
Note 1051 Unknown table 't1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment, `id` int(20) NOT NULL auto_increment,
`name` varchar(32) NOT NULL default '', `name` varchar(32) NOT NULL default '',
`other` int(20) NOT NULL default '0', `other` int(20) NOT NULL default '0',
...@@ -16,8 +130,6 @@ PRIMARY KEY (`id`), ...@@ -16,8 +130,6 @@ PRIMARY KEY (`id`),
KEY `name` (`name`), KEY `name` (`name`),
KEY `other_key` (`other`)) KEY `other_key` (`other`))
DEFAULT CHARSET=latin1; DEFAULT CHARSET=latin1;
DROP DATABASE IF EXISTS federated;
CREATE DATABASE federated;
CREATE TABLE federated.t1 ( CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment, `id` int(20) NOT NULL auto_increment,
`name` varchar(32) NOT NULL default '', `name` varchar(32) NOT NULL default '',
......
...@@ -14,7 +14,136 @@ DROP DATABASE IF EXISTS federated; ...@@ -14,7 +14,136 @@ DROP DATABASE IF EXISTS federated;
--enable_warnings --enable_warnings
CREATE DATABASE federated; CREATE DATABASE federated;
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
DEFAULT CHARSET=latin1;
connection master;
--disable_warnings
DROP DATABASE IF EXISTS federated;
--enable_warnings
CREATE DATABASE federated;
# test too many items (malformed) in the comment string url
--error 1005
eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:@/too/many/items/federated/t1';
# test not enough items (malformed) in the comment string url
--error 1005
eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1';
# test non-existant table
--replace_result $SLAVE_MYPORT SLAVE_PORT
--error 1219
eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t3';
# test bad user/password
--replace_result $SLAVE_MYPORT SLAVE_PORT
--error 1218
eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://user:pass@127.0.0.1:$SLAVE_MYPORT/federated/t1';
DROP TABLE IF EXISTS federated.t1;
# # correct connection, same named tables
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t1 (id, name) VALUES (2, 'fee');
SELECT * FROM federated.t1;
DELETE FROM federated.t1;
DROP TABLE federated.t1;
# correct connection, differently named tables
DROP TABLE IF EXISTS federated.t2;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t2 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
INSERT INTO federated.t2 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t2 (id, name) VALUES (2, 'fee');
SELECT * FROM federated.t2;
DROP TABLE federated.t2;
connection slave;
DROP TABLE IF EXISTS federated.t1;
DROP TABLE IF EXISTS federated.`t1%`;
CREATE TABLE federated.`t1%` (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
DEFAULT CHARSET=latin1;
connection master;
DROP TABLE IF EXISTS federated.t1;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1%';
INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t1 (id, name) VALUES (2, 'fee');
SELECT * FROM federated.t1;
DELETE FROM federated.t1;
DROP TABLE IF EXISTS federated.t1;
eval CREATE TABLE federated.`t1%` (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1%';
INSERT INTO federated.`t1%` (id, name) VALUES (1, 'foo');
INSERT INTO federated.`t1%` (id, name) VALUES (2, 'fee');
SELECT * FROM federated.`t1%`;
DELETE FROM federated.`t1%`;
DROP TABLE IF EXISTS federated.`t1%`;
connection slave;
DROP TABLE IF EXISTS federated.`t1%`;
# I wanted to use timestamp, but results will fail if so!!! # I wanted to use timestamp, but results will fail if so!!!
DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 ( CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment, `id` int(20) NOT NULL auto_increment,
`name` varchar(32) NOT NULL default '', `name` varchar(32) NOT NULL default '',
...@@ -25,12 +154,8 @@ CREATE TABLE federated.t1 ( ...@@ -25,12 +154,8 @@ CREATE TABLE federated.t1 (
KEY `other_key` (`other`)) KEY `other_key` (`other`))
DEFAULT CHARSET=latin1; DEFAULT CHARSET=latin1;
connection master;
--disable_warnings
DROP DATABASE IF EXISTS federated;
--enable_warnings
CREATE DATABASE federated;
connection master;
--replace_result $SLAVE_MYPORT SLAVE_PORT --replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 ( eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment, `id` int(20) NOT NULL auto_increment,
...@@ -660,33 +785,36 @@ INSERT INTO federated.t1 VALUES (0x0001); ...@@ -660,33 +785,36 @@ INSERT INTO federated.t1 VALUES (0x0001);
INSERT INTO federated.t1 VALUES (0x0100); INSERT INTO federated.t1 VALUES (0x0100);
SELECT HEX(a) FROM federated.t1; SELECT HEX(a) FROM federated.t1;
# # simple tests for cyrillic, given to me by
# TODO # DROP TABLE IF EXISTS federated.t1;
# # --replace_result $SLAVE_MYPORT SLAVE_PORT
# CREATE TABLE federated.t1 # eval CREATE TABLE federated.t1
# (a char(20)) charset=cp1251 # (a char(20)) charset=cp1251
# ENGINE="FEDERATED" COMMENT="mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1"; # ENGINE="FEDERATED" COMMENT="mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1";
# # #
# connection slave; # connection slave;
# DROP TABLE IF EXISTS federated.t1; # DROP TABLE IF EXISTS federated.t1;
# CREATE TABLE federated.t1 (a char(20)) charset=cp1251; # CREATE TABLE federated.t1 (a char(20)) charset=cp1251;
# # #
# connection master; # connection master;
# INSERT INTO federated.t1 values (_cp1251'--1'); # INSERT INTO federated.t1 values (_cp1251'--1');
# INSERT INTO federated.t1 values (_cp1251'--2'); # INSERT INTO federated.t1 values (_cp1251'--2');
# SELECT * FROM federated.t1;
# SET names cp1251; # SET names cp1251;
# INSERT INTO federated.t1 values ('--3'); # INSERT INTO federated.t1 values ('--3');
# INSERT INTO federated.t1 values ('-Ũ-4'); # INSERT INTO federated.t1 values ('-Ũ-4');
# SELECT * FROM federated.t1; # SELECT * FROM federated.t1;
# select hex(a) from federated.t1; # SELECT hex(a) from federated.t1;
# select hex(a) from federated.t1 ORDER BY a desc; # SELECT hex(a) from federated.t1 ORDER BY a desc;
# update federated.t1 SET a='--1' WHERE a='--1'; # UPDATE federated.t1 SET a='--1' WHERE a='--1';
# SELECT * FROM federated.t1; # SELECT * FROM federated.t1;
# DELETE FROM federated.t1 WHERE a='-Ũ-4'; # DELETE FROM federated.t1 WHERE a='-Ũ-4';
# SELECT * FROM federated.t1; # SELECT * FROM federated.t1;
# DELETE FROM federated.t1 WHERE a>'-'; # DELETE FROM federated.t1 WHERE a>'-';
# SELECT * FROM federated.t1; # SELECT * FROM federated.t1;
# SET names default; # SET names default;
# DROP TABLE IF EXISTS federated.t1;
# #
# DROP TABLE IF EXISTS federated.t1; # DROP TABLE IF EXISTS federated.t1;
# #
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment