| Bug #1641 | mysql_real_escape_string | ||
|---|---|---|---|
| Submitted: | 23 Oct 2003 23:39 | Modified: | 21 Apr 2008 13:42 |
| Reporter: | Robert Colbert | ||
| Status: | Won't fix | ||
| Category: | Server | Severity: | S4 (Feature request) |
| Version: | OS: | Any | |
| Assigned to: | Target Version: | ||
| Triage: | D5 (Feature request) | ||
[23 Oct 2003 23:39]
Robert Colbert
[22 Jul 2006 20: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 20: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 13:42]
Kent Boortz
There will most likely eventually be some solution to this. The MySQL ODBC driver is hit by this problem.
