mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
A fix for Bug#11918 "SP does not accept variables in LIMIT clause"
Allow stored procedure variables in LIMIT clause. Only allow variables of INTEGER types. Handle negative values by means of an implicit cast to UNSIGNED (similarly to prepared statement placeholders). Add tests. Make sure replication works by not doing NAME_CONST substitution for variables in LIMIT clause. Add replication tests.
This commit is contained in:
@ -405,6 +405,16 @@ bool String::append(const char *s)
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool String::append_ulonglong(ulonglong val)
|
||||
{
|
||||
if (realloc(str_length+MAX_BIGINT_WIDTH+2))
|
||||
return TRUE;
|
||||
char *end= (char*) longlong10_to_str(val, (char*) Ptr + str_length, 10);
|
||||
str_length= end - Ptr;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
Append a string in the given charset to the string
|
||||
with character set recoding
|
||||
|
Reference in New Issue
Block a user