Commit f30a53a0 authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-5.0-maint

into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint

parents d99af839 c8dde6df
...@@ -686,6 +686,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -686,6 +686,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break; break;
case 'T': case 'T':
opt_disable_keys=0; opt_disable_keys=0;
if (strlen(argument) >= FN_REFLEN)
{
/*
This check is made because the some the file functions below
have FN_REFLEN sized stack allocated buffers and will cause
a crash even if the input destination buffer is large enough
to hold the output.
*/
die(EX_USAGE, "Input filename too long: %s", argument);
}
break; break;
case '#': case '#':
DBUG_PUSH(argument ? argument : default_dbug_option); DBUG_PUSH(argument ? argument : default_dbug_option);
...@@ -2324,17 +2336,6 @@ static void dump_table(char *table, char *db) ...@@ -2324,17 +2336,6 @@ static void dump_table(char *table, char *db)
{ {
char filename[FN_REFLEN], tmp_path[FN_REFLEN]; char filename[FN_REFLEN], tmp_path[FN_REFLEN];
if (strlen(path) >= FN_REFLEN)
{
/*
This check is made because the some the file functions below
have FN_REFLEN sized stack allocated buffers and will cause
a crash even if the input destination buffer is large enough
to hold the output.
*/
die(EX_USAGE, "Input filename or options too long: %s", path);
}
/* /*
Convert the path to native os format Convert the path to native os format
and resolve to the full filepath. and resolve to the full filepath.
......
-- require r/have_outfile.require -- require r/have_outfile.require
disable_query_log; disable_query_log;
select load_file(concat(@tmpdir,"/outfile.test")); select load_file(concat(@tmpdir,"/outfile.test"));
--exec rm $MYSQLTEST_VARDIR/tmp/outfile.test --remove_file $MYSQLTEST_VARDIR/tmp/outfile.test
enable_query_log; enable_query_log;
...@@ -3206,7 +3206,7 @@ DROP TABLE t1; ...@@ -3206,7 +3206,7 @@ DROP TABLE t1;
# #
CREATE TABLE t1(a int); CREATE TABLE t1(a int);
INSERT INTO t1 VALUES (1), (2); INSERT INTO t1 VALUES (1), (2);
mysqldump: Input filename or options too long: aa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@@ CALL test_replication_sp2(); ...@@ -40,7 +40,15 @@ CALL test_replication_sp2();
INSERT INTO t1 VALUES (test_replication_sf()); INSERT INTO t1 VALUES (test_replication_sf());
INSERT INTO t1 VALUES (test_replication_sf()); INSERT INTO t1 VALUES (test_replication_sf());
INSERT INTO t1 VALUES (test_replication_sf()); INSERT INTO t1 VALUES (test_replication_sf());
DROP PROCEDURE IF EXISTS test_replication_sp1; select * from t1 into outfile "../tmp/t1_slave.txt";
DROP PROCEDURE IF EXISTS test_replication_sp2; create temporary table t1_slave select * from t1 where 1=0;
DROP FUNCTION IF EXISTS test_replication_sf; load data infile '../tmp/t1_slave.txt' into table t1_slave;
DROP TABLE IF EXISTS t1; select count(*) into @aux from t1, t1_slave
where ABS(t1.col_a - t1_slave.col_a) < 0.0001 ;
SELECT @aux;
@aux
12
DROP PROCEDURE test_replication_sp1;
DROP PROCEDURE test_replication_sp2;
DROP FUNCTION test_replication_sf;
DROP TABLE t1, t1_slave;
...@@ -77,27 +77,37 @@ INSERT INTO t1 VALUES (test_replication_sf()); ...@@ -77,27 +77,37 @@ INSERT INTO t1 VALUES (test_replication_sf());
INSERT INTO t1 VALUES (test_replication_sf()); INSERT INTO t1 VALUES (test_replication_sf());
INSERT INTO t1 VALUES (test_replication_sf()); INSERT INTO t1 VALUES (test_replication_sf());
# Record the results of the query on the master
--exec $MYSQL --port=$MASTER_MYPORT test -e "SELECT * FROM test.t1" > $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql
--sync_slave_with_master --sync_slave_with_master
# Record the results of the query on the slave # Dump table on slave
--exec $MYSQL --port=$SLAVE_MYPORT test -e "SELECT * FROM test.t1" > $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql select * from t1 into outfile "../tmp/t1_slave.txt";
# Compare the results from the master to the slave. # Load data from slave into temp table on master
--exec diff $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql connection master;
create temporary table t1_slave select * from t1 where 1=0;
load data infile '../tmp/t1_slave.txt' into table t1_slave;
--remove_file $MYSQLTEST_VARDIR/tmp/t1_slave.txt
# Compare master and slave temp table, use subtraction
# for floating point comparison of "double"
select count(*) into @aux from t1, t1_slave
where ABS(t1.col_a - t1_slave.col_a) < 0.0001 ;
SELECT @aux;
if (`SELECT @aux <> 12 OR @aux IS NULL`)
{
--echo # ERROR: We expected to get count(*) = 12.
SELECT col_a FROM t1;
SELECT col_a FROM t1_slave;
--echo # abort
exit;
}
# Cleanup # Cleanup
connection master; connection master;
--disable_warnings DROP PROCEDURE test_replication_sp1;
DROP PROCEDURE IF EXISTS test_replication_sp1; DROP PROCEDURE test_replication_sp2;
DROP PROCEDURE IF EXISTS test_replication_sp2; DROP FUNCTION test_replication_sf;
DROP FUNCTION IF EXISTS test_replication_sf; DROP TABLE t1, t1_slave;
DROP TABLE IF EXISTS t1;
--enable_warnings
--sync_slave_with_master --sync_slave_with_master
# If all is good, when can cleanup our dump files.
--system rm $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql
--system rm $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql
...@@ -705,9 +705,11 @@ begin ...@@ -705,9 +705,11 @@ begin
insert into test.t1 values (concat(x, "2"), y+2); insert into test.t1 values (concat(x, "2"), y+2);
end| end|
--system rm -f $MYSQLTEST_VARDIR/tmp/spout # Check that file does not exists
--error 1
--file_exists $MYSQLTEST_VARDIR/tmp/spout
call into_outfile("ofile", 1)| call into_outfile("ofile", 1)|
--system rm -f $MYSQLTEST_VARDIR/tmp/spout --remove_file $MYSQLTEST_VARDIR/tmp/spout
delete from t1| delete from t1|
drop procedure into_outfile| drop procedure into_outfile|
...@@ -722,9 +724,11 @@ begin ...@@ -722,9 +724,11 @@ begin
insert into test.t1 values (concat(x, "2"), y+2); insert into test.t1 values (concat(x, "2"), y+2);
end| end|
--system rm -f $MYSQLTEST_VARDIR/tmp/spdump # Check that file does not exists
--error 1
--file_exists $MYSQLTEST_VARDIR/tmp/spdump
call into_dumpfile("dfile", 1)| call into_dumpfile("dfile", 1)|
--system rm -f $MYSQLTEST_VARDIR/tmp/spdump --remove_file $MYSQLTEST_VARDIR/tmp/spdump
delete from t1| delete from t1|
drop procedure into_dumpfile| drop procedure into_dumpfile|
......
...@@ -43,8 +43,7 @@ mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \ ...@@ -43,8 +43,7 @@ mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \
@innodb_system_libs@ \ @innodb_system_libs@ \
@ndbcluster_libs@ @ndbcluster_system_libs@ \ @ndbcluster_libs@ @ndbcluster_system_libs@ \
$(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ \ $(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ \
$(yassl_libs) $(openssl_libs) \ $(yassl_libs) $(openssl_libs) @MYSQLD_EXTRA_LIBS@
@MYSQLD_EXTRA_LIBS@
noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
item_strfunc.h item_timefunc.h item_uniq.h \ item_strfunc.h item_timefunc.h item_uniq.h \
......
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