Ulf Wendel [Fri, 29 May 2009 11:59:26 +0000 (11:59 +0000)]
MFH - 'Fixing' test to reflect a libmysql vs. mysqlnd difference. With libmysql it is not defined what mysql_stmt_store_result() shall return when one tries to store the (non-existing) result set of a failed SQL statement, http://dev.mysql.com/doc/refman/6.0/en/mysql-stmt-store-result.html . mysqlnd will detect the SQL failure and return false. libmysql will return true. If you want libmysql to change, file a bug report at MySQL... I don't think there is a good way to work around this in the extension itself.
Ulf Wendel [Fri, 29 May 2009 11:01:06 +0000 (11:01 +0000)]
MFH - Another detail where mysqlnd is superior than libmysql. The mysql_info() from libmysql does not support SELECT: http://dev.mysql.com/doc/refman/6.0/en/mysql-info.html . mysqlnd does support it. Libmysql feature request filed http://bugs.mysql.com/bug.php?id=45189
Ulf Wendel [Fri, 29 May 2009 10:25:49 +0000 (10:25 +0000)]
MFH - Weaker test: functions are only available if HAVE_EMBEDDED_MYSQLI is set. There is probably no proper way to check this condition in the user land.
Andrey Hristov [Thu, 28 May 2009 16:35:41 +0000 (16:35 +0000)]
MFH:Fix a problem with cursors, which did not happen with unbuffered PS for
some reason. Double free of the data, which led to valgrind warnigns.
The fix actually optimizes the code in this cases because the old code
used copy_ctor while the new one skips it because it is not needed.
Transferring data ownership and nulling works best, for PS where we
always copy the string from the result set, unlike the text protocol.
Ulf Wendel [Thu, 28 May 2009 14:33:43 +0000 (14:33 +0000)]
MFH - what a wonderful word. After the change in HEAD its easy to do a merge. The merge removes all UEXPECTF sections from the old days. Yes, there have been UEXPECTFs in 5_3. I hope PHP 6 won't change again over time... :-)
Andrey Hristov [Thu, 28 May 2009 11:47:48 +0000 (11:47 +0000)]
MFH:
Fix a bug with mysqlnd_fetch_field(_direct()). With mysqlnd the optimised
function was called, which however, doesn't respect that during store the
raw data is not unpacked, to be lazy. The data is unpacked to zvals later,
during every row fetch. However, this way max_length won't be calculated
correctly. So, if a mysqlnd_fetch_field(_direct) call comes we need to
unpack everything and then calculate max_length...and that is expensive,
defies our lazy unpacking optimisation.
Andrey Hristov [Wed, 27 May 2009 19:57:11 +0000 (19:57 +0000)]
MFH:because we use int64_t we need corresponding printf modifiers. the type
can be different on 32 and 64 bit, thus we can't use ld and lld but
C helps us with inttypes.h and PRId64 and PRIu64 modifiers (without the %)
Ulf Wendel [Wed, 27 May 2009 17:52:32 +0000 (17:52 +0000)]
The test is bogus as long as there is no (proper) way to detect from the PHP userland if persistent connections do a change user or not. If they do is controlled by define at the moment.
Ulf Wendel [Wed, 27 May 2009 17:50:09 +0000 (17:50 +0000)]
Testing a little further into the direction of a possible mysqlnd vs. libmysql compatibility break or a libmysql bug. It is not clearly stated in the MySQL C-API documentation what excactly happens on stmt_reset().
Eric Stewart [Tue, 26 May 2009 06:09:18 +0000 (06:09 +0000)]
Add tests:
DOMComment::__construct() with constructor called twice.
DOMDocumentFragment::appendXML() with unbound fragment.
DOMDocumentFragment::appendXML() with unbalanced chunks.
DOMDocumentFragment::__construct() called twice.
DOMDocumentType: basic access to all properties.
DOMDocumentType::name with invalid state.
DOMDocumentType::entities with invalid state.
DOMDocumentType::notations with invalid state.
DOMDocumentType::publicId with invalid state.
DOMDocumentType::publicId with empty value.
DOMDocumentType::systemId with invalid state.
DOMDocumentType::systemId with empty value.
DOMDocumentType::internalSubset with invalid state.
Eric Stewart [Mon, 25 May 2009 06:03:41 +0000 (06:03 +0000)]
Add the following new tests:
DOMCharacterData::appendData() with no arguments.
DOMCharacterData::deleteData() with count exceeding string size.
DOMCharacterData::deleteData() with no arguments.
DOMCharacterData::deleteData() with offset exceeding string size.
DOMCharacterData::insertData() with no arguments.
DOMCharacterData::replaceData() with no arguments.
DOMComment::__construct() with more arguments than acceptable.
DOMDocumentFragment::__construct().
DOMDocumentFragment::__construct() with too many errors.
DOMDocumentFragment::appendXML() with no arguments.
DOMDocumentFragment::appendXML() with children with properties.