summaryrefslogtreecommitdiff
path: root/sql/parse_file.cc
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2009-06-19 13:24:43 +0500
committerSergey Glukhov <Sergey.Glukhov@sun.com>2009-06-19 13:24:43 +0500
commit9347649c16c176605aac1e36275fa89a6b21f9fc (patch)
tree2f3842512db3a74bdddfc82a19b3cdcbc3cf0b1f /sql/parse_file.cc
parent4de6d1a80f97dbb4a66b76ed44f0c026d0146cb4 (diff)
downloadmariadb-git-9347649c16c176605aac1e36275fa89a6b21f9fc.tar.gz
Bug#44834 strxnmov is expected to behave as you'd expect
The problem: described in the bug report. The fix: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used client/mysql.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/ha_ndbcluster.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/ha_ndbcluster_binlog.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/handler.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/log.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/mysqld.cc: removed unnecessary line sql/parse_file.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/sql_acl.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/sql_base.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/sql_db.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/sql_delete.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/sql_partition.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/sql_rename.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/sql_show.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/sql_table.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function sql/sql_view.cc: --increase buffers where it's necessary (buffers which are used in stxnmov) --decrease buffer lengths which are used as argument for strxnmov function
Diffstat (limited to 'sql/parse_file.cc')
-rw-r--r--sql/parse_file.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/parse_file.cc b/sql/parse_file.cc
index f2dbeba1bbf..3d65fa1de31 100644
--- a/sql/parse_file.cc
+++ b/sql/parse_file.cc
@@ -231,7 +231,7 @@ sql_create_definition_file(const LEX_STRING *dir, const LEX_STRING *file_name,
including dir name, file name itself, and an extension,
and with unpack_filename() executed over it.
*/
- path_end= strxnmov(path, FN_REFLEN, file_name->str, NullS) - path;
+ path_end= strxnmov(path, sizeof(path) - 1, file_name->str, NullS) - path;
}
// temporary file name
@@ -314,7 +314,7 @@ my_bool rename_in_schema_file(THD *thd,
const char *schema, const char *old_name,
const char *new_db, const char *new_name)
{
- char old_path[FN_REFLEN], new_path[FN_REFLEN], arc_path[FN_REFLEN];
+ char old_path[FN_REFLEN + 1], new_path[FN_REFLEN + 1], arc_path[FN_REFLEN + 1];
build_table_filename(old_path, sizeof(old_path) - 1,
schema, old_name, reg_ext, 0);