Commit 98062f56 authored by patg@govinda.patg.net's avatar patg@govinda.patg.net

WL# 3031

Post-commit issues fixed
* Test results for other tests fixed due to added error #s
* Memory allocation/free issues found with running with valgrind
* Fix to mysql-test-run shell script to run federated_server test (installs
mysql.servers table properly)
parent a3e85cce
...@@ -19,6 +19,7 @@ host ...@@ -19,6 +19,7 @@ host
plugin plugin
proc proc
procs_priv procs_priv
servers
slow_log slow_log
tables_priv tables_priv
time_zone time_zone
......
...@@ -6,26 +6,26 @@ Table Op Msg_type Msg_text ...@@ -6,26 +6,26 @@ Table Op Msg_type Msg_text
test.t4 backup error Failed copying .frm file (errno: X) test.t4 backup error Failed copying .frm file (errno: X)
test.t4 backup status Operation failed test.t4 backup status Operation failed
Warnings: Warnings:
Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
Error 1 Can't create/write to file 'MYSQLTEST_VARDIR/bogus/t4.frm' (Errcode: X) Error 1 Can't create/write to file 'MYSQLTEST_VARDIR/bogus/t4.frm' (Errcode: X)
backup table t4 to '../tmp'; backup table t4 to '../tmp';
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t4 backup status OK test.t4 backup status OK
Warnings: Warnings:
Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
backup table t4 to '../tmp'; backup table t4 to '../tmp';
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t4 backup error Failed copying .frm file (errno: X) test.t4 backup error Failed copying .frm file (errno: X)
test.t4 backup status Operation failed test.t4 backup status Operation failed
Warnings: Warnings:
Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
Error 1 Can't create/write to file 'MYSQLTEST_VARDIR/tmp/t4.frm' (Errcode: X) Error 1 Can't create/write to file 'MYSQLTEST_VARDIR/tmp/t4.frm' (Errcode: X)
drop table t4; drop table t4;
restore table t4 from '../tmp'; restore table t4 from '../tmp';
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t4 restore status OK test.t4 restore status OK
Warnings: Warnings:
Warning 1541 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
select count(*) from t4; select count(*) from t4;
count(*) count(*)
0 0
...@@ -35,19 +35,19 @@ backup table t1 to '../tmp'; ...@@ -35,19 +35,19 @@ backup table t1 to '../tmp';
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 backup status OK test.t1 backup status OK
Warnings: Warnings:
Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
drop table t1; drop table t1;
restore table t1 from '../bogus'; restore table t1 from '../bogus';
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
t1 restore error Failed copying .frm file t1 restore error Failed copying .frm file
Warnings: Warnings:
Warning 1541 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
Error 29 File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X) Error 29 File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X)
restore table t1 from '../tmp'; restore table t1 from '../tmp';
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 restore status OK test.t1 restore status OK
Warnings: Warnings:
Warning 1541 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
select n from t1; select n from t1;
n n
23 23
...@@ -62,7 +62,7 @@ Table Op Msg_type Msg_text ...@@ -62,7 +62,7 @@ Table Op Msg_type Msg_text
test.t2 backup status OK test.t2 backup status OK
test.t3 backup status OK test.t3 backup status OK
Warnings: Warnings:
Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
drop table t1,t2,t3; drop table t1,t2,t3;
restore table t1,t2,t3 from '../tmp'; restore table t1,t2,t3 from '../tmp';
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
...@@ -70,7 +70,7 @@ test.t1 restore status OK ...@@ -70,7 +70,7 @@ test.t1 restore status OK
test.t2 restore status OK test.t2 restore status OK
test.t3 restore status OK test.t3 restore status OK
Warnings: Warnings:
Warning 1541 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
select n from t1; select n from t1;
n n
23 23
...@@ -91,7 +91,7 @@ restore table t1 from '../tmp'; ...@@ -91,7 +91,7 @@ restore table t1 from '../tmp';
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 restore status OK test.t1 restore status OK
Warnings: Warnings:
Warning 1541 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
rename table t1 to t5; rename table t1 to t5;
lock tables t5 write; lock tables t5 write;
backup table t5 to '../tmp'; backup table t5 to '../tmp';
...@@ -99,7 +99,7 @@ unlock tables; ...@@ -99,7 +99,7 @@ unlock tables;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t5 backup status OK test.t5 backup status OK
Warnings: Warnings:
Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
drop table t5; drop table t5;
DROP TABLE IF EXISTS `t+1`; DROP TABLE IF EXISTS `t+1`;
CREATE TABLE `t+1` (c1 INT); CREATE TABLE `t+1` (c1 INT);
...@@ -108,13 +108,13 @@ BACKUP TABLE `t+1` TO '../tmp'; ...@@ -108,13 +108,13 @@ BACKUP TABLE `t+1` TO '../tmp';
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t+1 backup status OK test.t+1 backup status OK
Warnings: Warnings:
Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
DROP TABLE `t+1`; DROP TABLE `t+1`;
RESTORE TABLE `t+1` FROM '../tmp'; RESTORE TABLE `t+1` FROM '../tmp';
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t+1 restore status OK test.t+1 restore status OK
Warnings: Warnings:
Warning 1541 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
SELECT * FROM `t+1`; SELECT * FROM `t+1`;
c1 c1
1 1
......
...@@ -15,6 +15,7 @@ host ...@@ -15,6 +15,7 @@ host
plugin plugin
proc proc
procs_priv procs_priv
servers
slow_log slow_log
tables_priv tables_priv
time_zone time_zone
...@@ -47,6 +48,7 @@ host ...@@ -47,6 +48,7 @@ host
plugin plugin
proc proc
procs_priv procs_priv
servers
slow_log slow_log
tables_priv tables_priv
time_zone time_zone
...@@ -87,6 +89,7 @@ host ...@@ -87,6 +89,7 @@ host
plugin plugin
proc proc
procs_priv procs_priv
servers
slow_log slow_log
tables_priv tables_priv
time_zone time_zone
......
...@@ -76,6 +76,7 @@ host ...@@ -76,6 +76,7 @@ host
plugin plugin
proc proc
procs_priv procs_priv
servers
slow_log slow_log
tables_priv tables_priv
time_zone time_zone
...@@ -852,7 +853,7 @@ flush privileges; ...@@ -852,7 +853,7 @@ flush privileges;
SELECT table_schema, count(*) FROM information_schema.TABLES where table_name<>'binlog_index' AND table_name<>'apply_status' GROUP BY TABLE_SCHEMA; SELECT table_schema, count(*) FROM information_schema.TABLES where table_name<>'binlog_index' AND table_name<>'apply_status' GROUP BY TABLE_SCHEMA;
table_schema count(*) table_schema count(*)
information_schema 27 information_schema 27
mysql 21 mysql 22
create table t1 (i int, j int); create table t1 (i int, j int);
create trigger trg1 before insert on t1 for each row create trigger trg1 before insert on t1 for each row
begin begin
......
...@@ -170,8 +170,8 @@ ERROR 1049 (42000) at line 1: Unknown database 'invalid' ...@@ -170,8 +170,8 @@ ERROR 1049 (42000) at line 1: Unknown database 'invalid'
ERROR 1049 (42000) at line 1: Unknown database 'invalid' ERROR 1049 (42000) at line 1: Unknown database 'invalid'
Test connect with dbname + hostname Test connect with dbname + hostname
Test connect with dbname + _invalid_ hostname Test connect with dbname + _invalid_ hostname
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
The commands reported in the bug report The commands reported in the bug report
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
Too long dbname Too long dbname
......
...@@ -17,6 +17,7 @@ mysql.host OK ...@@ -17,6 +17,7 @@ mysql.host OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.servers OK
mysql.slow_log mysql.slow_log
note : The storage engine for the table doesn't support optimize note : The storage engine for the table doesn't support optimize
mysql.tables_priv OK mysql.tables_priv OK
...@@ -41,6 +42,7 @@ mysql.host OK ...@@ -41,6 +42,7 @@ mysql.host OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.servers OK
mysql.slow_log mysql.slow_log
note : The storage engine for the table doesn't support optimize note : The storage engine for the table doesn't support optimize
mysql.tables_priv OK mysql.tables_priv OK
......
...@@ -5,20 +5,20 @@ INITIAL_SIZE 16M ...@@ -5,20 +5,20 @@ INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M UNDO_BUFFER_SIZE = 1M
ENGINE=MYISAM; ENGINE=MYISAM;
Warnings: Warnings:
Error 1465 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
ALTER LOGFILE GROUP lg1 ALTER LOGFILE GROUP lg1
ADD UNDOFILE 'undofile02.dat' ADD UNDOFILE 'undofile02.dat'
INITIAL_SIZE = 4M INITIAL_SIZE = 4M
ENGINE=XYZ; ENGINE=XYZ;
Warnings: Warnings:
Error 1286 Unknown table engine 'XYZ' Error 1286 Unknown table engine 'XYZ'
Error 1465 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
CREATE TABLESPACE ts1 CREATE TABLESPACE ts1
ADD DATAFILE 'datafile.dat' ADD DATAFILE 'datafile.dat'
USE LOGFILE GROUP lg1 USE LOGFILE GROUP lg1
INITIAL_SIZE 12M; INITIAL_SIZE 12M;
Warnings: Warnings:
Error 1465 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
set storage_engine=ndb; set storage_engine=ndb;
CREATE LOGFILE GROUP lg1 CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat' ADD UNDOFILE 'undofile.dat'
......
...@@ -16,7 +16,7 @@ ERROR HY000: Failed to create LOGFILE GROUP ...@@ -16,7 +16,7 @@ ERROR HY000: Failed to create LOGFILE GROUP
SHOW WARNINGS; SHOW WARNINGS;
Level Code Message Level Code Message
Error 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB Error 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB
Error 1515 Failed to create LOGFILE GROUP Error 1516 Failed to create LOGFILE GROUP
CREATE LOGFILE GROUP lg1 CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat' ADD UNDOFILE 'undofile.dat'
INITIAL_SIZE 1M INITIAL_SIZE 1M
......
...@@ -3475,7 +3475,7 @@ SELECT 0.9888889889 * 1.011111411911; ...@@ -3475,7 +3475,7 @@ SELECT 0.9888889889 * 1.011111411911;
0.9998769417899202067879 0.9998769417899202067879
prepare stmt from 'select 1 as " a "'; prepare stmt from 'select 1 as " a "';
Warnings: Warnings:
Warning 1546 Leading spaces are removed from name ' a ' Warning 1548 Leading spaces are removed from name ' a '
execute stmt; execute stmt;
a a
1 1
......
...@@ -712,7 +712,7 @@ drop database mysqltest; ...@@ -712,7 +712,7 @@ drop database mysqltest;
show full plugin; show full plugin;
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1541 The syntax 'SHOW PLUGIN' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW PLUGINS' instead Warning 1543 The syntax 'SHOW PLUGIN' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW PLUGINS' instead
show plugin; show plugin;
show plugins; show plugins;
create database `mysqlttest\1`; create database `mysqlttest\1`;
......
...@@ -5633,7 +5633,7 @@ drop function if exists pi; ...@@ -5633,7 +5633,7 @@ drop function if exists pi;
create function pi() returns varchar(50) create function pi() returns varchar(50)
return "pie, my favorite desert."; return "pie, my favorite desert.";
Warnings: Warnings:
Note 1578 This function 'pi' has the same name as a native function. Note 1580 This function 'pi' has the same name as a native function.
SET @save_sql_mode=@@sql_mode; SET @save_sql_mode=@@sql_mode;
SET SQL_MODE='IGNORE_SPACE'; SET SQL_MODE='IGNORE_SPACE';
select pi(), pi (); select pi(), pi ();
...@@ -5682,15 +5682,15 @@ use test; ...@@ -5682,15 +5682,15 @@ use test;
create function `database`() returns varchar(50) create function `database`() returns varchar(50)
return "Stored function database"; return "Stored function database";
Warnings: Warnings:
Note 1578 This function 'database' has the same name as a native function. Note 1580 This function 'database' has the same name as a native function.
create function `current_user`() returns varchar(50) create function `current_user`() returns varchar(50)
return "Stored function current_user"; return "Stored function current_user";
Warnings: Warnings:
Note 1578 This function 'current_user' has the same name as a native function. Note 1580 This function 'current_user' has the same name as a native function.
create function md5(x varchar(50)) returns varchar(50) create function md5(x varchar(50)) returns varchar(50)
return "Stored function md5"; return "Stored function md5";
Warnings: Warnings:
Note 1578 This function 'md5' has the same name as a native function. Note 1580 This function 'md5' has the same name as a native function.
SET SQL_MODE='IGNORE_SPACE'; SET SQL_MODE='IGNORE_SPACE';
select database(), database (); select database(), database ();
database() database () database() database ()
......
...@@ -7,11 +7,11 @@ return 1; ...@@ -7,11 +7,11 @@ return 1;
create function x() returns int create function x() returns int
return 2; return 2;
Warnings: Warnings:
Note 1578 This function 'x' has the same name as a native function. Note 1580 This function 'x' has the same name as a native function.
create function y() returns int create function y() returns int
return 3; return 3;
Warnings: Warnings:
Note 1578 This function 'y' has the same name as a native function. Note 1580 This function 'y' has the same name as a native function.
select a(); select a();
a() a()
1 1
......
...@@ -535,7 +535,7 @@ use db_bug7787| ...@@ -535,7 +535,7 @@ use db_bug7787|
CREATE PROCEDURE p1() CREATE PROCEDURE p1()
SHOW INNODB STATUS; | SHOW INNODB STATUS; |
Warnings: Warnings:
Warning 1541 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead Warning 1543 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead
GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost| GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost|
DROP DATABASE db_bug7787| DROP DATABASE db_bug7787|
drop user user_bug7787@localhost| drop user user_bug7787@localhost|
......
...@@ -15,6 +15,7 @@ host ...@@ -15,6 +15,7 @@ host
plugin plugin
proc proc
procs_priv procs_priv
servers
slow_log slow_log
tables_priv tables_priv
time_zone time_zone
......
...@@ -101,13 +101,13 @@ create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6), ...@@ -101,13 +101,13 @@ create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6),
t8 timestamp(8), t10 timestamp(10), t12 timestamp(12), t8 timestamp(8), t10 timestamp(10), t12 timestamp(12),
t14 timestamp(14)); t14 timestamp(14));
Warnings: Warnings:
Warning 1541 The syntax 'TIMESTAMP(2)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead Warning 1543 The syntax 'TIMESTAMP(2)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
Warning 1541 The syntax 'TIMESTAMP(4)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead Warning 1543 The syntax 'TIMESTAMP(4)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
Warning 1541 The syntax 'TIMESTAMP(6)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead Warning 1543 The syntax 'TIMESTAMP(6)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
Warning 1541 The syntax 'TIMESTAMP(8)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead Warning 1543 The syntax 'TIMESTAMP(8)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
Warning 1541 The syntax 'TIMESTAMP(10)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead Warning 1543 The syntax 'TIMESTAMP(10)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
Warning 1541 The syntax 'TIMESTAMP(12)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead Warning 1543 The syntax 'TIMESTAMP(12)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
Warning 1541 The syntax 'TIMESTAMP(14)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead Warning 1543 The syntax 'TIMESTAMP(14)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
insert t1 values (0,0,0,0,0,0,0), insert t1 values (0,0,0,0,0,0,0),
("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", ("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
"1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
......
...@@ -175,7 +175,7 @@ Warning 1266 Using storage engine MyISAM for table 't1' ...@@ -175,7 +175,7 @@ Warning 1266 Using storage engine MyISAM for table 't1'
drop table t1; drop table t1;
set table_type=MYISAM; set table_type=MYISAM;
Warnings: Warnings:
Warning 1541 The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. Please use 'storage_engine' instead Warning 1543 The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. Please use 'storage_engine' instead
create table t1 (a int); create table t1 (a int);
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
update t1 set a='abc'; update t1 set a='abc';
......
...@@ -640,32 +640,32 @@ select extractValue('<a>a','/a'); ...@@ -640,32 +640,32 @@ select extractValue('<a>a','/a');
extractValue('<a>a','/a') extractValue('<a>a','/a')
NULL NULL
Warnings: Warnings:
Warning 1512 Incorrect XML value: 'parse error at line 1 pos 5: unexpected END-OF-INPUT' Warning 1513 Incorrect XML value: 'parse error at line 1 pos 5: unexpected END-OF-INPUT'
select extractValue('<a>a<','/a'); select extractValue('<a>a<','/a');
extractValue('<a>a<','/a') extractValue('<a>a<','/a')
NULL NULL
Warnings: Warnings:
Warning 1512 Incorrect XML value: 'parse error at line 1 pos 6: END-OF-INPUT unexpected (ident or '/' wanted)' Warning 1513 Incorrect XML value: 'parse error at line 1 pos 6: END-OF-INPUT unexpected (ident or '/' wanted)'
select extractValue('<a>a</','/a'); select extractValue('<a>a</','/a');
extractValue('<a>a</','/a') extractValue('<a>a</','/a')
NULL NULL
Warnings: Warnings:
Warning 1512 Incorrect XML value: 'parse error at line 1 pos 7: END-OF-INPUT unexpected (ident wanted)' Warning 1513 Incorrect XML value: 'parse error at line 1 pos 7: END-OF-INPUT unexpected (ident wanted)'
select extractValue('<a>a</a','/a'); select extractValue('<a>a</a','/a');
extractValue('<a>a</a','/a') extractValue('<a>a</a','/a')
NULL NULL
Warnings: Warnings:
Warning 1512 Incorrect XML value: 'parse error at line 1 pos 8: END-OF-INPUT unexpected ('>' wanted)' Warning 1513 Incorrect XML value: 'parse error at line 1 pos 8: END-OF-INPUT unexpected ('>' wanted)'
select extractValue('<a>a</a></b>','/a'); select extractValue('<a>a</a></b>','/a');
extractValue('<a>a</a></b>','/a') extractValue('<a>a</a></b>','/a')
NULL NULL
Warnings: Warnings:
Warning 1512 Incorrect XML value: 'parse error at line 1 pos 12: '</b>' unexpected (END-OF-INPUT wanted)' Warning 1513 Incorrect XML value: 'parse error at line 1 pos 12: '</b>' unexpected (END-OF-INPUT wanted)'
select extractValue('<a b=>a</a>','/a'); select extractValue('<a b=>a</a>','/a');
extractValue('<a b=>a</a>','/a') extractValue('<a b=>a</a>','/a')
NULL NULL
Warnings: Warnings:
Warning 1512 Incorrect XML value: 'parse error at line 1 pos 7: '>' unexpected (ident or string wanted)' Warning 1513 Incorrect XML value: 'parse error at line 1 pos 7: '>' unexpected (ident or string wanted)'
select extractValue('<e>1</e>','position()'); select extractValue('<e>1</e>','position()');
ERROR HY000: XPATH syntax error: '' ERROR HY000: XPATH syntax error: ''
select extractValue('<e>1</e>','last()'); select extractValue('<e>1</e>','last()');
...@@ -716,17 +716,17 @@ select extractValue('<zot><tim0><01>10:39:15</01><02>140</02></tim0></zot>','//* ...@@ -716,17 +716,17 @@ select extractValue('<zot><tim0><01>10:39:15</01><02>140</02></tim0></zot>','//*
extractValue('<zot><tim0><01>10:39:15</01><02>140</02></tim0></zot>','//*') extractValue('<zot><tim0><01>10:39:15</01><02>140</02></tim0></zot>','//*')
NULL NULL
Warnings: Warnings:
Warning 1512 Incorrect XML value: 'parse error at line 1 pos 13: unknown token unexpected (ident or '/' wanted)' Warning 1513 Incorrect XML value: 'parse error at line 1 pos 13: unknown token unexpected (ident or '/' wanted)'
select extractValue('<.>test</.>','//*'); select extractValue('<.>test</.>','//*');
extractValue('<.>test</.>','//*') extractValue('<.>test</.>','//*')
NULL NULL
Warnings: Warnings:
Warning 1512 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)' Warning 1513 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)'
select extractValue('<->test</->','//*'); select extractValue('<->test</->','//*');
extractValue('<->test</->','//*') extractValue('<->test</->','//*')
NULL NULL
Warnings: Warnings:
Warning 1512 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)' Warning 1513 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)'
select extractValue('<:>test</:>','//*'); select extractValue('<:>test</:>','//*');
extractValue('<:>test</:>','//*') extractValue('<:>test</:>','//*')
test test
......
...@@ -30,6 +30,7 @@ windows=$4 ...@@ -30,6 +30,7 @@ windows=$4
# Initialize variables # Initialize variables
c_d="" i_d="" c_d="" i_d=""
c_s="" i_s=""
c_h="" i_h="" c_h="" i_h=""
c_u="" i_u="" c_u="" i_u=""
c_f="" i_f="" c_f="" i_f=""
...@@ -199,21 +200,21 @@ then ...@@ -199,21 +200,21 @@ then
echo "Preparing servers table" 1>&2; echo "Preparing servers table" 1>&2;
fi fi
c_d="$c_d c_s="
CREATE TABLE servers (" CREATE TABLE servers ("
c_d="$c_d Server_name char(64) NOT NULL," c_s="$c_s Server_name char(64) NOT NULL,"
c_d="$c_d Hostname char(64) NOT NULL," c_s="$c_s Host char(64) NOT NULL,"
c_d="$c_d Db char(64) NOT NULL," c_s="$c_s Db char(64) NOT NULL,"
c_d="$c_d Username char(64) NOT NULL," c_s="$c_s Username char(64) NOT NULL,"
c_d="$c_d Passwd char(64) NOT NULL," c_s="$c_s Password char(64) NOT NULL,"
c_d="$c_d Portnum INT(4)," c_s="$c_s Port INT(4),"
c_d="$c_d Sock char(64)," c_s="$c_s Socket char(64),"
c_d="$c_d Scheme char(64) NOT NULL," c_s="$c_s Wrapper char(64) NOT NULL,"
c_d="$c_d Owner char(64) NOT NULL," c_s="$c_s Owner char(64) NOT NULL,"
c_d="$c_d PRIMARY KEY (Server_name));" c_s="$c_s PRIMARY KEY (Server_name))"
c_s="$c_s comment='MySQL Foreign Servers table';"
i_d="INSERT INTO servers VALUES
i_s="INSERT INTO servers VALUES
('test','localhost','test','root','', 0, ('test','localhost','test','root','', 0,
'','mysql','root'); '','mysql','root');
" "
...@@ -876,6 +877,9 @@ $i_f ...@@ -876,6 +877,9 @@ $i_f
$c_pl $c_pl
$i_pl $i_pl
$c_s
$i_s
$c_t $c_t
$c_c $c_c
......
...@@ -9405,6 +9405,7 @@ keyword: ...@@ -9405,6 +9405,7 @@ keyword:
| LANGUAGE_SYM {} | LANGUAGE_SYM {}
| NO_SYM {} | NO_SYM {}
| OPEN_SYM {} | OPEN_SYM {}
| OPTIONS_SYM {}
| OWNER_SYM {} | OWNER_SYM {}
| PARSER_SYM {} | PARSER_SYM {}
| PARTITION_SYM {} | PARTITION_SYM {}
......
...@@ -554,7 +554,7 @@ static int parse_url_error(FEDERATED_SHARE *share, TABLE *table, int error_num) ...@@ -554,7 +554,7 @@ static int parse_url_error(FEDERATED_SHARE *share, TABLE *table, int error_num)
DBUG_PRINT("info", DBUG_PRINT("info",
("error: parse_url. Returning error code %d \ ("error: parse_url. Returning error code %d \
freeing share->connection_string %lx", freeing share->connection_string %lx",
error_num, share->connection_string)); error_num, (long unsigned int) share->connection_string));
my_free((gptr) share->connection_string, MYF(0)); my_free((gptr) share->connection_string, MYF(0));
share->connection_string= 0; share->connection_string= 0;
} }
...@@ -587,7 +587,7 @@ int get_connection(FEDERATED_SHARE *share) ...@@ -587,7 +587,7 @@ int get_connection(FEDERATED_SHARE *share)
error_num=1; error_num=1;
goto error; goto error;
} }
DBUG_PRINT("info", ("get_server_by_name returned server at %lx", server)); DBUG_PRINT("info", ("get_server_by_name returned server at %lx", (long unsigned int) server));
/* /*
Most of these should never be empty strings, error handling will Most of these should never be empty strings, error handling will
...@@ -606,13 +606,15 @@ int get_connection(FEDERATED_SHARE *share) ...@@ -606,13 +606,15 @@ int get_connection(FEDERATED_SHARE *share)
share->password= server->password; share->password= server->password;
if (server->db) if (server->db)
share->database= server->db; share->database= server->db;
if (server->sport)
share->sport= server->sport; share->port= server->port ? server->port : MYSQL_PORT;
share->port= server->port ? server->port : 0;
if (server->host) if (server->host)
share->hostname= server->host; share->hostname= server->host;
if (server->socket) if (server->socket)
share->socket= server->socket; share->socket= server->socket;
else if (strcmp(share->hostname, my_localhost) == 0)
share->socket= my_strdup(MYSQL_UNIX_ADDR, MYF(0));
if (server->scheme) if (server->scheme)
share->scheme= server->scheme; share->scheme= server->scheme;
else else
...@@ -623,7 +625,7 @@ int get_connection(FEDERATED_SHARE *share) ...@@ -623,7 +625,7 @@ int get_connection(FEDERATED_SHARE *share)
DBUG_PRINT("info", ("share->hostname %s", share->hostname)); DBUG_PRINT("info", ("share->hostname %s", share->hostname));
DBUG_PRINT("info", ("share->database %s", share->database)); DBUG_PRINT("info", ("share->database %s", share->database));
DBUG_PRINT("info", ("share->port %d", share->port)); DBUG_PRINT("info", ("share->port %d", share->port));
DBUG_PRINT("info", ("share->socket %d", share->socket)); DBUG_PRINT("info", ("share->socket %s", share->socket));
DBUG_RETURN(0); DBUG_RETURN(0);
error: error:
...@@ -698,7 +700,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, ...@@ -698,7 +700,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
share->port= 0; share->port= 0;
share->socket= 0; share->socket= 0;
DBUG_PRINT("info", ("share at %lx", share)); DBUG_PRINT("info", ("share at %lx", (long unsigned int) share));
DBUG_PRINT("info", ("Length: %d", table->s->connect_string.length)); DBUG_PRINT("info", ("Length: %d", table->s->connect_string.length));
DBUG_PRINT("info", ("String: '%.*s'", table->s->connect_string.length, DBUG_PRINT("info", ("String: '%.*s'", table->s->connect_string.length,
table->s->connect_string.str)); table->s->connect_string.str));
...@@ -709,8 +711,8 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, ...@@ -709,8 +711,8 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
// Add a null for later termination of table name // Add a null for later termination of table name
share->connection_string[table->s->connect_string.length]= 0; share->connection_string[table->s->connect_string.length]= 0;
DBUG_PRINT("info",("parse_url alloced share->scheme %lx", DBUG_PRINT("info",("parse_url alloced share->connection_string %lx",
share->connection_string)); (long unsigned int) share->connection_string));
DBUG_PRINT("info",("share->connection_string %s",share->connection_string)); DBUG_PRINT("info",("share->connection_string %s",share->connection_string));
/* No delimiters, must be a straight connection name */ /* No delimiters, must be a straight connection name */
...@@ -721,8 +723,9 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, ...@@ -721,8 +723,9 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
DBUG_PRINT("info", DBUG_PRINT("info",
("share->connection_string %s internal format \ ("share->connection_string %s internal format \
share->connection_string", share->connection_string %lx",
share->connection_string, share->connection_string)); share->connection_string,
(long unsigned int) share->connection_string));
share->parsed= FALSE; share->parsed= FALSE;
if ((error_num= get_connection(share))) if ((error_num= get_connection(share)))
...@@ -742,7 +745,8 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, ...@@ -742,7 +745,8 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
// Add a null for later termination of table name // Add a null for later termination of table name
share->connection_string[table->s->connect_string.length]= 0; share->connection_string[table->s->connect_string.length]= 0;
share->scheme= share->connection_string; share->scheme= share->connection_string;
DBUG_PRINT("info",("parse_url alloced share->scheme %lx", share->scheme)); DBUG_PRINT("info",("parse_url alloced share->scheme %lx",
(long unsigned int) share->scheme));
/* /*
remove addition of null terminator and store length remove addition of null terminator and store length
...@@ -1492,7 +1496,8 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table) ...@@ -1492,7 +1496,8 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table)
error: error:
pthread_mutex_unlock(&federated_mutex); pthread_mutex_unlock(&federated_mutex);
my_free((gptr) tmp_share.scheme, MYF(MY_ALLOW_ZERO_PTR)); my_free((gptr) tmp_share.connection_string, MYF(MY_ALLOW_ZERO_PTR));
tmp_share.connection_string= 0;
my_free((gptr) share, MYF(MY_ALLOW_ZERO_PTR)); my_free((gptr) share, MYF(MY_ALLOW_ZERO_PTR));
return NULL; return NULL;
} }
...@@ -1514,11 +1519,12 @@ static int free_share(FEDERATED_SHARE *share) ...@@ -1514,11 +1519,12 @@ static int free_share(FEDERATED_SHARE *share)
hash_delete(&federated_open_tables, (byte*) share); hash_delete(&federated_open_tables, (byte*) share);
if (share->parsed) if (share->parsed)
my_free((gptr) share->socket, MYF(MY_ALLOW_ZERO_PTR)); my_free((gptr) share->socket, MYF(MY_ALLOW_ZERO_PTR));
if (share->connection_string) /*if (share->connection_string)
{ {
*/
my_free((gptr) share->connection_string, MYF(MY_ALLOW_ZERO_PTR)); my_free((gptr) share->connection_string, MYF(MY_ALLOW_ZERO_PTR));
share->connection_string= 0; share->connection_string= 0;
} /*}*/
thr_lock_delete(&share->lock); thr_lock_delete(&share->lock);
VOID(pthread_mutex_destroy(&share->mutex)); VOID(pthread_mutex_destroy(&share->mutex));
my_free((gptr) share, MYF(0)); my_free((gptr) share, MYF(0));
...@@ -2827,7 +2833,9 @@ int ha_federated::create(const char *name, TABLE *table_arg, ...@@ -2827,7 +2833,9 @@ int ha_federated::create(const char *name, TABLE *table_arg,
if (!(retval= parse_url(&tmp_share, table_arg, 1))) if (!(retval= parse_url(&tmp_share, table_arg, 1)))
retval= check_foreign_data_source(&tmp_share, 1); retval= check_foreign_data_source(&tmp_share, 1);
//my_free((gptr) tmp_share.connection_string, MYF(MY_ALLOW_ZERO_PTR)); /* free this because strdup created it in parse_url */
my_free((gptr) tmp_share.connection_string, MYF(MY_ALLOW_ZERO_PTR));
tmp_share.connection_string= 0;
DBUG_RETURN(retval); DBUG_RETURN(retval);
} }
......
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