-
Notifications
You must be signed in to change notification settings - Fork 7.9k
add test for bug #60994 (Reading a multibyte CLOB caps at 8192 characters) #1566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ext/pdo_oci/tests/bug60994.phpt
Outdated
/* $Id$ */ | ||
if (!extension_loaded('mbstring') || !extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); | ||
require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'; | ||
if (!strpos(strtolower(getenv('PDOTEST_DSN_UTF8')), 'charset=al32utf8')) die('skip expected output valid for AL32UTF8 character set'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the different DSN var, PDOTEST_DSN_UTF8
... I assumed you'd need a separate DSN for the UTF8 tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not using a different DSN for UTF8. DSN string will be changed manually to run UTF8 tests. Hence, please change "PDOTEST_DSN_UTF8" to "PDOTEST_DSN".
I think it's somewhat plausible that the root cause of this bug behavior here could be bug#70700 (#1569). |
@cjbj please can we get some feedback ? |
@ashnazg The test looks good. Before it can be merged
|
ext/pdo_oci/tests/bug60994.phpt
Outdated
<?php | ||
require 'ext/pdo/tests/pdo_test.inc'; | ||
$dbh = PDOTest::factory(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To run in the PDO testsuite the following needs to be added:
$dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL);
$dbh->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
@cjbj can we get your approval on this one please ? |
@krakjoe the base bug would need to be fixed first, so this will have to wait. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decide to merge this test in first. Given the bug 60994 is not fixed yet, we need to add XFAIL section to indicate this is an expected failure so far.
Thanks so much for your help.
ext/pdo_oci/tests/bug60994.phpt
Outdated
echo 'beg of stream4 is ', $start4, PHP_EOL; | ||
echo 'end of stream4 is ', $ending4, PHP_EOL; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the following two lines here:
--XFAIL--
Fails due to Bug 60994
We decide to merge this test in first. Given the bug 60994 is not fixed yet, we need to add XFAIL section to indicate this is an expected failure so far.
@tianfyang : requested changes are done. |
Comment on behalf of sixd at php.net: Committed - thank you |
Tests to show bug behavior of "Reading a multibyte CLOB caps at 8192 characters", as described in https://bugs.php.net/bug.php?id=60994.
Additional notes are on my question here (http://stackoverflow.com/questions/33026617/pdo-oci-truncates-large-multibyte-clobs) that might help diagnose the bug.
@cjbj: I had to construct this PHPT by hand from my standalone PHP test file, so it may need some polishing to run just right with your test scaffolding (those
require
targets etc). I'll update PR if you'll highlight any edits that are needed to get it running.