summaryrefslogtreecommitdiff
path: root/sql/sql_base.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
commitc92abdc2a0d8a33aef47ca9f3114a0bceb5650a7 (patch)
tree2f3842512db3a74bdddfc82a19b3cdcbc3cf0b1f /sql/sql_base.cc
parentf6ea8b7675275ac40bd4ae7d210b824a6de9d45a (diff)
downloadmariadb-git-c92abdc2a0d8a33aef47ca9f3114a0bceb5650a7.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
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 6b3f75376a3..134b45a9100 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -2432,7 +2432,7 @@ bool lock_table_name_if_not_cached(THD *thd, const char *db,
bool check_if_table_exists(THD *thd, TABLE_LIST *table, bool *exists)
{
- char path[FN_REFLEN];
+ char path[FN_REFLEN + 1];
int rc;
DBUG_ENTER("check_if_table_exists");
@@ -2649,7 +2649,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
real fix will be made after definition cache will be made)
*/
{
- char path[FN_REFLEN];
+ char path[FN_REFLEN + 1];
enum legacy_db_type not_used;
build_table_filename(path, sizeof(path) - 1,
table_list->db, table_list->table_name, reg_ext, 0);
@@ -6340,7 +6340,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
(report_error == REPORT_ALL_ERRORS ||
report_error == REPORT_EXCEPT_NON_UNIQUE))
{
- char buff[NAME_LEN*2+1];
+ char buff[NAME_LEN*2 + 2];
if (db && db[0])
{
strxnmov(buff,sizeof(buff)-1,db,".",table_name,NullS);