summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-10-11 04:25:00 +0300
committermonty@hundin.mysql.fi <>2001-10-11 04:25:00 +0300
commit075a0fbde0a068f970473555edfa785592e61291 (patch)
tree52236f7a3879ba894bd97a5318843692f1843b8d /tools
parent6265dfccda684865f201e66c305960cffbfdd659 (diff)
downloadmariadb-git-075a0fbde0a068f970473555edfa785592e61291.tar.gz
Portability fixes
Fixed bug with long log-filenames in Innobase.
Diffstat (limited to 'tools')
-rw-r--r--tools/mysqlmanager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/mysqlmanager.c b/tools/mysqlmanager.c
index 3a95b4e9a49..92f76ac4218 100644
--- a/tools/mysqlmanager.c
+++ b/tools/mysqlmanager.c
@@ -1543,10 +1543,11 @@ static struct manager_exec* manager_exec_new(char* arg_start,char* arg_end)
tmp->error="Too few arguments";
return tmp;
}
- tmp->data_buf=(char*)tmp+sizeof(*tmp);
+ /* We have to allocate 'args' first as this must be alligned */
+ tmp->args=(char**)(tmp +1);
+ tmp->data_buf= (char*) (tmp->args + num_args);
memcpy(tmp->data_buf,arg_start,arg_len);
tmp->data_buf_size=arg_len;
- tmp->args=(char**)(tmp->data_buf+arg_len);
tmp->num_args=num_args;
tmp->ident=tmp->data_buf;
tmp->ident_len=strlen(tmp->ident);