summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-09-03 02:25:27 +0300
committermonty@mysql.com <>2004-09-03 02:25:27 +0300
commitbb4ccdb1772ba979d132aeda270288033ff86fd2 (patch)
tree2c3de27c55c2158bb0643aad40b6246069fb7920 /sql
parent8547d98c88369c517853fe9f27cdcab1c14dfbc9 (diff)
downloadmariadb-git-bb4ccdb1772ba979d132aeda270288033ff86fd2.tar.gz
Remove extra '/' after mysql_real_data_home
Add missing parameter to strxnmov() that caused some INTO OUTFILE commands to core dump
Diffstat (limited to 'sql')
-rw-r--r--sql/item_cmpfunc.cc1
-rw-r--r--sql/sql_class.cc3
-rw-r--r--sql/sql_load.cc2
-rw-r--r--sql/sql_table.cc2
4 files changed, 4 insertions, 4 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 4ddb648399a..f473d242b07 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -2752,7 +2752,6 @@ longlong Item_cond_xor::val_int()
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];
}
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 36b1b89f6bf..b103ee29095 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -891,7 +891,8 @@ static File create_file(THD *thd, char *path, sql_exchange *exchange,
option|= MY_REPLACE_DIR; // Force use of db directory
#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);
if (!access(path, F_OK))
{
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 1f4905837f0..1ad9a6aa952 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -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 <
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 */
}
else
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 408f3408346..58e3bc1d9ac 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1579,7 +1579,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table,
reg_ext))
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);
if (lock_and_wait_for_table_name(thd,table))