Skip to content
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

Fixed the condition for result set values to be of native type, making it compatible with previous versions. #11616

Closed

Conversation

SakiTakamachi
Copy link
Member

@SakiTakamachi SakiTakamachi commented Jul 7, 2023

return false;
}
unsigned int int_and_float_native = !bval;
pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a redundant code, so I'll fix it later

@youkidearitai
Copy link
Contributor

I tried create test file https://gist.github.com/youkidearitai/eb7d57001810bf9410f9bf6d231d15b2
@SakiTakamachi Could you add this test case?

memo: I set database environment to below.

export PDO_MYSQL_TEST_DSN='mysql:host=127.0.0.1;dbname=ore'
export PDO_MYSQL_TEST_USER='root'
export PDO_MYSQL_TEST_PASS='password'
make test TESTS=ext/pdo_mysql

@youkidearitai
Copy link
Contributor

Oh, one point. #11587 target version is PHP 8.1 and newer. @SakiTakamachi If you target PHP 8.1 and newer, please set target branch is PHP-8.1.

@youkidearitai
Copy link
Contributor

@iluuu1994 @Girgias What do you think this PR? I'd like hear your thoughts.

@SakiTakamachi
Copy link
Member Author

Could you add this test case?
Very helpful, thank you very much!

I have a couple of questions about the test.

  1. i don't know the naming convention for test files. How should I name them?
  2. this time, I think I need a combination of true and false for PDO::ATTR_EMULATE_PREPARES and PDO::ATTR_STRINGIFY_FETCHES, for a total of 4 tests. In that case, should we prepare four test files? (If so, I would like your opinion on how the naming should be done in that case.)

If you target PHP 8.1 and newer, please set target branch is PHP-8.1.

OK, I see.

@youkidearitai
Copy link
Contributor

i don't know the naming convention for test files. How should I name them?

Sorry I don't know. Each to their own.

this time, I think I need a combination of true and false for PDO::ATTR_EMULATE_PREPARES and PDO::ATTR_STRINGIFY_FETCHES, for a total of 4 tests. In that case, should we prepare four test files? (If so, I would like your opinion on how the naming should be done in that case.)

Mainly, concatenate into one file. Please refer to another phpt files.

@SakiTakamachi
Copy link
Member Author

I couldn't change the base branch from main, so I recreated the PR.
#11622

@SakiTakamachi
Copy link
Member Author

I am closing this PR.

@SakiTakamachi SakiTakamachi deleted the fix/result-sets-when-stringify branch July 7, 2023 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants