Commit 6ad5a6c7 authored by unknown's avatar unknown
Browse files

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

into  mysql.com:/home/eric/mysql-5.0


sql/sql_yacc.yy:
  Auto merged
parents f83297c8 00d77fdd
Loading
Loading
Loading
Loading
+24 −24
Original line number Diff line number Diff line
@@ -25,28 +25,28 @@ CREATE TABLE federated.t1 (
`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 federated table. The data source connection string 'mysql://root@127.0.0.1:@/too/many/items/federated/t1' is not in the correct format
CONNECTION='mysql://root@127.0.0.1:@/too/many/items/federated/t1';
ERROR HY000: Can't create federated table. The data source connection string 'mysql://root@127.0.0.1:@/too/many/items/federated/t1' is not in the correct format
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';
CONNECTION='mysql://root@127.0.0.1';
ERROR HY000: Can't create federated table. The data source connection string 'mysql://root@127.0.0.1' is not in the correct format
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';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t3';
ERROR HY000: Can't create federated table. Foreign data src error : ': 1146 : Table 'federated.t3' doesn't 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';
CONNECTION='mysql://user:pass@127.0.0.1:SLAVE_PORT/federated/t1';
ERROR HY000: Unable to connect to foreign data source - database ' database federated username user hostname 127.0.0.1'!
DROP TABLE IF EXISTS federated.t1;
Warnings:
@@ -56,7 +56,7 @@ CREATE TABLE federated.t1 (
`name` varchar(32) NOT NULL default ''
    )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='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;
@@ -73,7 +73,7 @@ CREATE TABLE federated.t2 (
`name` varchar(32) NOT NULL default ''
    )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='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;
@@ -98,7 +98,7 @@ CREATE TABLE federated.t1 (
`name` varchar(32) NOT NULL default ''
    )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1%';
CONNECTION='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;
@@ -112,7 +112,7 @@ CREATE TABLE federated.`t1%` (
`name` varchar(32) NOT NULL default ''
    )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1%';
CONNECTION='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%`;
@@ -139,7 +139,7 @@ CREATE TABLE federated.t1 (
`created` datetime default '2004-04-04 04:04:04',
PRIMARY KEY  (`id`))
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111);
INSERT INTO federated.t1 (name, other) VALUES ('Second Name', 22222);
INSERT INTO federated.t1 (name, other) VALUES ('Third Name', 33333);
@@ -279,7 +279,7 @@ key name(`name`),
key other(`other`),
key created(`created`))
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (name, other, created)
VALUES ('First Name', 11111, '2004-01-01 01:01:01');
INSERT INTO federated.t1 (name, other, created)
@@ -419,7 +419,7 @@ CREATE TABLE federated.t1 (
PRIMARY KEY  (`id`) )
ENGINE="FEDERATED"
  DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111);
INSERT INTO federated.t1 (name, other) VALUES ('Second Name', NULL);
INSERT INTO federated.t1 (name, other) VALUES ('Third Name', 33333);
@@ -484,7 +484,7 @@ PRIMARY KEY (`id`),
KEY nameoth (name, other))
ENGINE="FEDERATED" DEFAULT
CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (name, other) VALUES ('First Name', '1111');
INSERT INTO federated.t1 (name, other) VALUES ('Second Name', '2222');
INSERT INTO federated.t1 (name, other) VALUES ('Third Name', '3333');
@@ -524,7 +524,7 @@ KEY bincol(bincol),
KEY floatval(floatval))
ENGINE="FEDERATED"
  DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (name, bincol, floatval, other) 
VALUES ('first', 0x65, 11.11, 1111);
INSERT INTO federated.t1 (name, bincol, floatval, other)
@@ -589,7 +589,7 @@ key col2(col2),
key col3(col3),
key col4(col4))
ENGINE="FEDERATED"
  COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (col1, col2, col3, col4) 
VALUES (1, 'one One', 11, 1111);
INSERT INTO federated.t1 (col1, col2, col3, col4) 
@@ -798,7 +798,7 @@ key 3key(`col2`,`col3`,`col4`),
key 2key (`col3`,`col4`),
key col4(col4))
ENGINE="FEDERATED"
  COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (col1, col2, col3, col4) 
VALUES ('aaaa', 'aaaaaaaaaaaaaaaaaaa', 'ababababab', 'acacacacacacacac');
INSERT INTO federated.t1 (col1, col2, col3, col4) 
@@ -898,7 +898,7 @@ CREATE TABLE federated.t1 (
primary key (`col1`, `col2`, `col3`))
ENGINE="FEDERATED"
  DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 VALUES ('a00', '110', 'cc0');
INSERT INTO federated.t1 VALUES ('aaa', '111', 'ccc');
INSERT INTO federated.t1 VALUES ('bbb', '222', 'yyy');
@@ -933,7 +933,7 @@ CREATE TABLE federated.t1 (
`other` int)
ENGINE="FEDERATED"
DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 values (NULL, NULL, NULL, NULL);
INSERT INTO federated.t1 values ();
INSERT INTO federated.t1 (id) VALUES (1);
@@ -968,7 +968,7 @@ CREATE TABLE federated.t1 (
PRIMARY KEY (blurb_id))
ENGINE="FEDERATED"
  DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types.  This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements.  The overview is intentionally brief.  The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.");
INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.");
INSERT INTO federated.t1 VALUES (3, " A floating-point number.  p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following.  FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined.  ");
@@ -994,7 +994,7 @@ PRIMARY KEY (a),
KEY (b))
ENGINE="FEDERATED"
  DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 VALUES (3,3,3),(1,1,1),(2,2,2),(4,4,4);
DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
@@ -1252,7 +1252,7 @@ int, i999 int, i1000 int, b varchar(256))
row_format=dynamic
ENGINE="FEDERATED"
DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1
values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -1322,7 +1322,7 @@ PRIMARY KEY(id),
index(code),
index(fileguts(10)))
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('ASDFWERQWETWETAWETA', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2003-03-03 03:03:03');
INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2004-04-04 04:04:04');
INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', 'jimbob', '2004-04-04 04:04:04');
@@ -1340,7 +1340,7 @@ DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (
`a` BLOB)
ENGINE="FEDERATED"
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 VALUES (0x00);
INSERT INTO federated.t1 VALUES (0x0001);
INSERT INTO federated.t1 VALUES (0x0100);
@@ -1378,7 +1378,7 @@ CREATE TABLE federated.t1 (
PRIMARY KEY  (`id`),
KEY (country_id) )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Kumar', 1, 11111);
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Lenz', 2, 22222);
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Marizio', 3, 33333);
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ CREATE TABLE federated.t1 (
PRIMARY KEY (`id`)
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/archive_table';
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/archive_table';
INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t1 (id, name) VALUES (2, 'bar');
SELECT * FROM federated.t1;
+24 −24
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ CREATE TABLE federated.t1 (
    `name` varchar(32) NOT NULL default ''
    )
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:@/too/many/items/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:@/too/many/items/federated/t1';

# test not enough items (malformed) in the comment string url
--error 1432 
@@ -26,7 +26,7 @@ CREATE TABLE federated.t1 (
    `name` varchar(32) NOT NULL default ''
    )
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1';
  CONNECTION='mysql://root@127.0.0.1';

# test non-existant table
--replace_result $SLAVE_MYPORT SLAVE_PORT
@@ -36,7 +36,7 @@ eval CREATE TABLE federated.t1 (
    `name` varchar(32) NOT NULL default ''
    )
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t3';
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t3';

# test bad user/password 
--replace_result $SLAVE_MYPORT SLAVE_PORT
@@ -46,7 +46,7 @@ eval CREATE TABLE federated.t1 (
    `name` varchar(32) NOT NULL default ''
    )
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://user:pass@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='mysql://user:pass@127.0.0.1:$SLAVE_MYPORT/federated/t1';

DROP TABLE IF EXISTS federated.t1;
# # correct connection, same named tables
@@ -56,7 +56,7 @@ eval CREATE TABLE federated.t1 (
    `name` varchar(32) NOT NULL default ''
    )
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='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');
@@ -73,7 +73,7 @@ eval CREATE TABLE federated.t2 (
    `name` varchar(32) NOT NULL default ''
    )
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='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');
@@ -100,7 +100,7 @@ eval CREATE TABLE federated.t1 (
    `name` varchar(32) NOT NULL default ''
    )
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1%';
  CONNECTION='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');
@@ -115,7 +115,7 @@ eval CREATE TABLE federated.`t1%` (
    `name` varchar(32) NOT NULL default ''
    )
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1%';
  CONNECTION='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');
@@ -146,7 +146,7 @@ eval CREATE TABLE federated.t1 (
    `created` datetime default '2004-04-04 04:04:04',
    PRIMARY KEY  (`id`))
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111);
INSERT INTO federated.t1 (name, other) VALUES ('Second Name', 22222);
@@ -213,7 +213,7 @@ eval CREATE TABLE federated.t1 (
    key other(`other`),
    key created(`created`))
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

INSERT INTO federated.t1 (name, other, created)
  VALUES ('First Name', 11111, '2004-01-01 01:01:01');
@@ -284,7 +284,7 @@ eval CREATE TABLE federated.t1 (
    PRIMARY KEY  (`id`) )
  ENGINE="FEDERATED"
  DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111);
INSERT INTO federated.t1 (name, other) VALUES ('Second Name', NULL);
@@ -333,7 +333,7 @@ eval CREATE TABLE federated.t1 (
    KEY nameoth (name, other))
  ENGINE="FEDERATED" DEFAULT
  CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

INSERT INTO federated.t1 (name, other) VALUES ('First Name', '1111');
INSERT INTO federated.t1 (name, other) VALUES ('Second Name', '2222');
@@ -372,7 +372,7 @@ eval CREATE TABLE federated.t1 (
    KEY floatval(floatval))
  ENGINE="FEDERATED"
  DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

INSERT INTO federated.t1 (name, bincol, floatval, other) 
  VALUES ('first', 0x65, 11.11, 1111);
@@ -421,7 +421,7 @@ eval CREATE TABLE federated.t1 (
  key col3(col3),
  key col4(col4))
  ENGINE="FEDERATED"
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

INSERT INTO federated.t1 (col1, col2, col3, col4) 
  VALUES (1, 'one One', 11, 1111);
@@ -515,7 +515,7 @@ eval CREATE TABLE federated.t1 (
  key 2key (`col3`,`col4`),
  key col4(col4))
  ENGINE="FEDERATED"
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

INSERT INTO federated.t1 (col1, col2, col3, col4) 
  VALUES ('aaaa', 'aaaaaaaaaaaaaaaaaaa', 'ababababab', 'acacacacacacacac');
@@ -567,7 +567,7 @@ eval CREATE TABLE federated.t1 (
  primary key (`col1`, `col2`, `col3`))
  ENGINE="FEDERATED"
  DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

INSERT INTO federated.t1 VALUES ('a00', '110', 'cc0');
INSERT INTO federated.t1 VALUES ('aaa', '111', 'ccc');
@@ -606,7 +606,7 @@ eval CREATE TABLE federated.t1 (
    `other` int)
ENGINE="FEDERATED"
DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

# these both should be the same
INSERT INTO federated.t1 values (NULL, NULL, NULL, NULL);
@@ -640,7 +640,7 @@ eval CREATE TABLE federated.t1 (
    PRIMARY KEY (blurb_id))
  ENGINE="FEDERATED"
  DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; 
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; 

INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types.  This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements.  The overview is intentionally brief.  The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.");
INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.");
@@ -667,7 +667,7 @@ eval CREATE TABLE federated.t1 (
    KEY (b))
  ENGINE="FEDERATED"
  DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

INSERT INTO federated.t1 VALUES (3,3,3),(1,1,1),(2,2,2),(4,4,4);

@@ -931,7 +931,7 @@ int, i999 int, i1000 int, b varchar(256))
row_format=dynamic
ENGINE="FEDERATED"
DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

INSERT INTO federated.t1
values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -1000,7 +1000,7 @@ eval CREATE TABLE federated.t1 (
    index(code),
    index(fileguts(10)))
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; 
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; 
INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('ASDFWERQWETWETAWETA', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2003-03-03 03:03:03');
INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2004-04-04 04:04:04');
INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', 'jimbob', '2004-04-04 04:04:04');
@@ -1019,7 +1019,7 @@ DROP TABLE IF EXISTS federated.t1;
eval CREATE TABLE federated.t1 (
  `a` BLOB)
ENGINE="FEDERATED"
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

INSERT INTO federated.t1 VALUES (0x00);
INSERT INTO federated.t1 VALUES (0x0001);
@@ -1031,7 +1031,7 @@ SELECT HEX(a) FROM federated.t1;
# --replace_result $SLAVE_MYPORT SLAVE_PORT
# eval CREATE TABLE federated.t1
#  (a char(20)) charset=cp1251
#  ENGINE="FEDERATED" COMMENT="mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1";
#  ENGINE="FEDERATED" CONNECTION="mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1";
# # 
#  connection slave;
# DROP TABLE IF EXISTS federated.t1;
@@ -1093,7 +1093,7 @@ eval CREATE TABLE federated.t1 (
    PRIMARY KEY  (`id`),
    KEY (country_id) )
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';

INSERT INTO federated.t1 (name, country_id, other) VALUES ('Kumar', 1, 11111);
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Lenz', 2, 22222);
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ eval CREATE TABLE federated.t1 (
    PRIMARY KEY (`id`)
    )
  ENGINE="FEDERATED" DEFAULT CHARSET=latin1
  COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/archive_table';
  CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/archive_table';

INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t1 (id, name) VALUES (2, 'bar');
+21 −15
Original line number Diff line number Diff line
@@ -518,7 +518,7 @@ static int check_foreign_data_source(


/*
  Parse connection info from table->s->comment
  Parse connection info from table->s->connect_string

  SYNOPSIS
    parse_url()
@@ -563,7 +563,14 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
  DBUG_ENTER("ha_federated::parse_url");

  share->port= 0;
  share->scheme= my_strdup(table->s->comment, MYF(0));
  DBUG_PRINT("info", ("Length %d \n", table->s->connect_string.length));
  DBUG_PRINT("info", ("String %.*s \n", table->s->connect_string.length, 
                      table->s->connect_string.str));
  share->scheme= my_strdup_with_length(table->s->connect_string.str,
		                       table->s->connect_string.length+1,
				       MYF(0));
  // Add a null for later termination of table name
  share->scheme[table->s->connect_string.length]= 0;
  DBUG_PRINT("info",("parse_url alloced share->scheme %lx", share->scheme));

  /*
@@ -673,7 +680,8 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
    my_free((gptr) share->scheme, MYF(0));
    share->scheme= 0;
  }
  my_error(error_num, MYF(0), table->s->comment);
  /* FIXME: table->s->connect_string is NOT null terminated */
  my_error(error_num, MYF(0), "invalid connection string");
  DBUG_RETURN(error_num);

}
@@ -1313,7 +1321,7 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table)
                          &share, sizeof(*share),
                          &tmp_table_name, tmp_table_name_length+ 1,
                          &select_query,
                          query.length()+strlen(table->s->comment)+1,
                          query.length()+table->s->connect_string.length+1,
                          NullS)))
    {
      pthread_mutex_unlock(&federated_mutex);
@@ -1918,11 +1926,9 @@ int ha_federated::delete_row(const byte *buf)

  String delete_string(delete_buffer, sizeof(delete_buffer), &my_charset_bin);
  String data_string(data_buffer, sizeof(data_buffer), &my_charset_bin);
  delete_string.length(0);
  data_string.length(0);

  DBUG_ENTER("ha_federated::delete_row");

  delete_string.length(0);
  delete_string.append(FEDERATED_DELETE);
  delete_string.append(FEDERATED_FROM);
  delete_string.append(FEDERATED_BTICK);
@@ -1932,9 +1938,11 @@ int ha_federated::delete_row(const byte *buf)

  for (Field **field= table->field; *field; field++)
  {
    delete_string.append((*field)->field_name);
    Field *cur_field= *field;
    data_string.length(0);
    delete_string.append(cur_field->field_name);

    if ((*field)->is_null())
    if (cur_field->is_null())
    {
      delete_string.append(FEDERATED_IS);
      data_string.append(FEDERATED_NULL);
@@ -1942,16 +1950,14 @@ int ha_federated::delete_row(const byte *buf)
    else
    {
      delete_string.append(FEDERATED_EQ);
      (*field)->val_str(&data_string);
      (*field)->quote_data(&data_string);
      cur_field->val_str(&data_string);
      cur_field->quote_data(&data_string);
    }

    delete_string.append(data_string);
    data_string.length(0);

    if (*(field + 1))
    delete_string.append(FEDERATED_AND);
  }
  delete_string.length(delete_string.length()-5); // Remove trailing AND

  delete_string.append(FEDERATED_LIMIT1);
  DBUG_PRINT("info",
Loading