summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorcmiller@zippy.cornsilk.net <>2006-09-27 14:42:56 -0400
committercmiller@zippy.cornsilk.net <>2006-09-27 14:42:56 -0400
commitc0ab40d3901e8323ecb0eb3748bc3e7e06de2baa (patch)
tree71e70ee6239a3fcd2339ea532e0a8ae409272f6d /client
parent7a761a2545e9407cd46f641062b464073081a210 (diff)
downloadmariadb-git-c0ab40d3901e8323ecb0eb3748bc3e7e06de2baa.tar.gz
Bug#21476: (Thread stack overrun not caught, causing SEGV)
The STACK_MIN_SIZE is currently set to 8192, when we actually need (emperically discovered) 9236 bytes to raise an fatal error, on Ubuntu Dapper Drake, libc6 2.3.6-0ubuntu2, Linux kernel 2.6.15-27-686, on x86. I'm taking that as a new lower bound, plus 100B of wiggle-room for sundry word sizes and stack behaviors. The added test verifies in a cross-platform way that there are no gaps between the space that we think we need and what we actually need to report an error. DOCUMENTERS: This also adds "let" to the mysqltest commands that evaluate an argument to expand variables therein. (Only right of the "=", of course.)
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 0f0abe682b5..ca588b7ba24 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -1609,7 +1609,10 @@ int do_save_master_pos()
int do_let(struct st_query *query)
{
char *p= query->first_argument;
- char *var_name, *var_name_end, *var_val_start;
+ char *var_name, *var_name_end;
+ DYNAMIC_STRING let_rhs_expr;
+
+ init_dynamic_string(&let_rhs_expr, "", 512, 2048);
/* Find <var_name> */
if (!*p)
@@ -1628,10 +1631,13 @@ int do_let(struct st_query *query)
/* Find start of <var_val> */
while (*p && my_isspace(charset_info,*p))
p++;
- var_val_start= p;
+
+ do_eval(&let_rhs_expr, p, FALSE);
+
query->last_argument= query->end;
/* Assign var_val to var_name */
- return var_set(var_name, var_name_end, var_val_start, query->end);
+ return var_set(var_name, var_name_end, let_rhs_expr.str,
+ (let_rhs_expr.str + let_rhs_expr.length));
}