Commit bb4ccdb1 authored by monty@mysql.com's avatar monty@mysql.com

Remove extra '/' after mysql_real_data_home

Add missing parameter to strxnmov() that caused some INTO OUTFILE commands to core dump
parent 8547d98c
...@@ -525,13 +525,6 @@ else ...@@ -525,13 +525,6 @@ else
fi fi
fi fi
MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR $EXTRA_MYSQLBINLOG_OPT"
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES CLIENT_BINDIR
if [ -z "$MASTER_MYSQLD" ] if [ -z "$MASTER_MYSQLD" ]
then then
MASTER_MYSQLD=$MYSQLD MASTER_MYSQLD=$MYSQLD
...@@ -564,6 +557,12 @@ then ...@@ -564,6 +557,12 @@ then
fi fi
MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR $EXTRA_MYSQLBINLOG_OPT"
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES CLIENT_BINDIR
MYSQL_TEST_ARGS="--no-defaults --socket=$MASTER_MYSOCK --database=$DB \ MYSQL_TEST_ARGS="--no-defaults --socket=$MASTER_MYSOCK --database=$DB \
--user=$DBUSER --password=$DBPASSWD --silent -v --skip-safemalloc \ --user=$DBUSER --password=$DBPASSWD --silent -v --skip-safemalloc \
--tmpdir=$MYSQL_TMP_DIR --port=$MASTER_MYPORT $MYSQL_TEST_SSL_OPTS" --tmpdir=$MYSQL_TMP_DIR --port=$MASTER_MYPORT $MYSQL_TEST_SSL_OPTS"
......
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;
drop table if exists t0,t5,t6,t7,t8,t9;
drop database if exists mysqltest; drop database if exists mysqltest;
create table T1 (id int primary key, Word varchar(40) not null, Index(Word)); create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
create table t4 (id int primary key, Word varchar(40) not null); create table t4 (id int primary key, Word varchar(40) not null);
......
drop table if exists t0,t1,t2,t3,t4; drop table if exists t0,t1,t2,t3,t4;
drop table if exists t0,t5,t6,t7,t8,t9;
create table t0 SELECT 1,"table 1"; create table t0 SELECT 1,"table 1";
create table t2 SELECT 2,"table 2"; create table t2 SELECT 2,"table 2";
create table t3 SELECT 3,"table 3"; create table t3 SELECT 3,"table 3";
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
--disable_warnings --disable_warnings
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;
# Clear up from other tests (to ensure that SHOW TABLES below is right)
drop table if exists t0,t5,t6,t7,t8,t9;
drop database if exists mysqltest; drop database if exists mysqltest;
--enable_warnings --enable_warnings
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
--disable_warnings --disable_warnings
drop table if exists t0,t1,t2,t3,t4; drop table if exists t0,t1,t2,t3,t4;
# Clear up from other tests (to ensure that SHOW TABLES below is right)
drop table if exists t0,t5,t6,t7,t8,t9;
--enable_warnings --enable_warnings
create table t0 SELECT 1,"table 1"; create table t0 SELECT 1,"table 1";
......
...@@ -2752,7 +2752,6 @@ longlong Item_cond_xor::val_int() ...@@ -2752,7 +2752,6 @@ longlong Item_cond_xor::val_int()
Item *Item_func_not::neg_transformer(THD *thd) /* NOT(x) -> x */ Item *Item_func_not::neg_transformer(THD *thd) /* NOT(x) -> x */
{ {
// We should apply negation elimination to the argument of the NOT function
return args[0]; return args[0];
} }
......
...@@ -891,7 +891,8 @@ static File create_file(THD *thd, char *path, sql_exchange *exchange, ...@@ -891,7 +891,8 @@ static File create_file(THD *thd, char *path, sql_exchange *exchange,
option|= MY_REPLACE_DIR; // Force use of db directory option|= MY_REPLACE_DIR; // Force use of db directory
#endif #endif
strxnmov(path, FN_REFLEN, mysql_real_data_home, thd->db ? thd->db : ""); strxnmov(path, FN_REFLEN, mysql_real_data_home, thd->db ? thd->db : "",
NullS);
(void) fn_format(path, exchange->file_name, path, "", option); (void) fn_format(path, exchange->file_name, path, "", option);
if (!access(path, F_OK)) if (!access(path, F_OK))
{ {
......
...@@ -183,7 +183,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, ...@@ -183,7 +183,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
strlen(ex->file_name)+strlen(mysql_real_data_home)+strlen(tdb)+3 < strlen(ex->file_name)+strlen(mysql_real_data_home)+strlen(tdb)+3 <
FN_REFLEN) FN_REFLEN)
{ {
(void) sprintf(name,"%s/%s/%s",mysql_data_home,tdb,ex->file_name); (void) sprintf(name,"%s%s/%s",mysql_real_data_home,tdb,ex->file_name);
unpack_filename(name,name); /* Convert to system format */ unpack_filename(name,name); /* Convert to system format */
} }
else else
......
...@@ -1579,7 +1579,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table, ...@@ -1579,7 +1579,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table,
reg_ext)) reg_ext))
DBUG_RETURN(-1); // protect buffer overflow DBUG_RETURN(-1); // protect buffer overflow
my_snprintf(dst_path, sizeof(dst_path), "%s/%s/%s", my_snprintf(dst_path, sizeof(dst_path), "%s%s/%s",
mysql_real_data_home, db, table_name); mysql_real_data_home, db, table_name);
if (lock_and_wait_for_table_name(thd,table)) if (lock_and_wait_for_table_name(thd,table))
......
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