Recommit with an Windows build fix:
Fix inconsistencies
- memory allocated with spprintf, or likes, outside of mysqlnd's
allocator functions should not be freed by the mysqlnd's allocator
(a wrapper around emalloc/malloc).
- memory allocated by the mysqlnd's allocator should only be freed
by it.
- add a mode to track memory usage (malloc/free)
Pierre Joye [Thu, 1 Apr 2010 20:21:50 +0000 (20:21 +0000)]
- revert revision 297277, break the builds (declaration must go 1st, size of void * and other known situations). Also Johannes, can you check that commit pls? Thought we were in bugs fixing only for 5.3
Fix inconsistencies
- memory allocated with spprintf, or likes, outside of mysqlnd's
allocator functions should not be freed by the mysqlnd's allocator
(a wrapper around emalloc/malloc).
- memory allocated by the mysqlnd's allocator should only be freed
by it.
- add a mode to track memory usage (malloc/free)
Fixed bug #51347 mysqli_close / connection memory leak
Streams API registers every stream as resource, which lands then
in EG(regular_list), however doesn't clean that when the stream is
closed. At the end this is a para-leak. At the end of the script
all memory is cleaned, however this is a problem for long runnig
scripts that open connections. For every opened and closed connection
about 150 Bytes on 32bit and 250 Bytes on 64bit will be "lost",
according to memory_get_usage().
Andrey Hristov [Mon, 29 Mar 2010 17:04:16 +0000 (17:04 +0000)]
Make it coupled - what is allocated with mnd_ should be freed
with mnd_ and vice versa.
Added mnd_pestrndup and mnd_pestrdup, which wrap the normal
calls to be able to track this calls.
Fixed some failing tests.
Andrey Hristov [Fri, 26 Mar 2010 16:58:25 +0000 (16:58 +0000)]
Fix tests that fail when the MySQL's socket file is not /tmp/mysql.sock
as it is in when compiled from source and the default for mysqlnd.
SuSE for example uses /var/run/mysql/mysql.sock . Also, sql.safe_mode
(ext/mysql and ingres) needs the socket.
Fix possible crashes in mysqlnd. When packets are shorter, functions should
return error.
Andrei Zmievski [Thu, 18 Mar 2010 22:37:25 +0000 (22:37 +0000)]
I am sorry I tried fixing PHP without extensive discussion on the mailing list.
I am sorry I tried fixing PHP without extensive discussion on the mailing list.
I am sorry I tried fixing PHP without extensive discussion on the mailing list.
Andrey Hristov [Wed, 17 Mar 2010 18:00:47 +0000 (18:00 +0000)]
Fix a bug that a statement that is reset doesn't clean
the wire properly (as it is done when the statement is closed).
If there is more that one result sets returned from the PS
(like a call to SP that returns at least one RSet next to the
status rset) then the line was blocked. PS Multi-Res is not supported
in any libmysql from a GA-ed MySQL.
Andrey Hristov [Wed, 17 Mar 2010 11:40:37 +0000 (11:40 +0000)]
fix valgrind warning introduced with the latest patch. The memory
should be calloc-ed, not malloced, because the code that uses the
stmt storage needs that.
Andrey Hristov [Tue, 16 Mar 2010 12:36:57 +0000 (12:36 +0000)]
decouple the methods in MYSQLND_STMT from the data,
needed to move to a new structure MYSQLND_STMT. Makes
the code cleaner and less error-prone.
Also fix PDO/MySQL which directly touch mysqlnd internals
instead of using API calls.
Derick Rethans [Sun, 7 Mar 2010 13:47:06 +0000 (13:47 +0000)]
- Change this test case because non-6 digits are supported now, and clarify
that the "1" doesn't show because the precision isn't high enough. (Same
happens if you change it to 9).