Bug #1641 | mysql_real_escape_string | ||
---|---|---|---|
Submitted: | 23 Oct 2003 21:39 | Modified: | 21 Apr 2008 11:42 |
Reporter: | Robert Colbert | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server | Severity: | S4 (Feature request) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any |
[23 Oct 2003 21:39]
Robert Colbert
[22 Jul 2006 18:39]
Kent Boortz
Giving NULL as 'to' argument to this function, could be set to mean "return number of characters only, don't write anything". Giving NULL in the current implementation is "undefined", and would in most cases crash the application using the function. So not sure that altering the behaviour of an existing function is the right thing to do, a new function mysql_real_buffer_size_needed() might be a better aproach. Note that setting the destination buffer lenght to zero is already a undocumented special case, for backward compatibility. It means "I know I have enough buffer".
[22 Jul 2006 18:55]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/9452
[21 Apr 2008 11:42]
Kent Boortz
There will most likely eventually be some solution to this. The MySQL ODBC driver is hit by this problem.