-
Notifications
You must be signed in to change notification settings - Fork 375
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
Remove the limitation of getting binary as strings as INOUT param #759
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #759 +/- ##
==========================================
+ Coverage 78.85% 78.86% +<.01%
==========================================
Files 25 25
Lines 7157 7160 +3
==========================================
+ Hits 5644 5647 +3
Misses 1513 1513
Continue to review full report at Codecov.
|
@@ -1180,9 +1180,10 @@ int pdo_sqlsrv_stmt_param_hook( _Inout_ pdo_stmt_t *stmt, | |||
} | |||
// if the parameter is output or input/output, translate the type between the PDO::PARAM_* constant | |||
// and the SQLSRV_PHPTYPE_* constant | |||
int pdo_type = param->param_type; | |||
// vso 2829: derive the pdo_type for input/output parameter as well | |||
int pdo_type = (direction == SQL_PARAM_OUTPUT) ? param->param_type : param->param_type & ~PDO_PARAM_INPUT_OUTPUT; |
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.
What does the syntax & ~
do here?
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.
It's deriving the pdo param type (see original line 1185) using bitwise operators because for inout params the param type is "bitwise ORed". For example, PDO::PARAM_STR | PDO::PARAM_INPUT_OUTPUT
This change is