-
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
Odbc 172 update for connres and appveyor #814
Changes from 3 commits
af9f77e
b2f7b20
82be814
0495513
c1d5793
a18a59b
cb78977
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,8 @@ killing the connection and then not freeing it. The latter case is the only one | |
that should fail. Finally, execute two queries in two threads on a recovered | ||
non-MARS connection. This should fail too. | ||
--SKIPIF-- | ||
<?php require('skipif_protocol_not_tcp.inc'); | ||
<?php require('skipif_mid-refactor.inc'); | ||
require('skipif_protocol_not_tcp.inc'); | ||
require('skipif_version_less_than_2k14.inc'); ?> | ||
--FILE-- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe put skipif_mid-refactor.inc to the end? because it skips sql server < 2016? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. skipif_mid-refactor doesn't skip any SQL Server unless AE is set, in which case it will skip versions < 2016. That's what we want isn't it? |
||
<?php | ||
|
@@ -208,18 +209,18 @@ unset($conn_break); | |
|
||
?> | ||
--EXPECTREGEX-- | ||
Statement 1 successful. | ||
16 rows in result set. | ||
Statement 2 successful. | ||
9 rows in result set. | ||
Statement 3 successful. | ||
-1 rows in result set. | ||
Statement 4 successful. | ||
-1 rows in result set. | ||
Statement 5 successful. | ||
-1 rows in result set. | ||
Error executing statement 6. | ||
SQLSTATE\[08S02\]: \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]TCP Provider: An existing connection was forcibly closed by the remote host. | ||
Statement 7 successful. | ||
Error executing statement 8. | ||
SQLSTATE\[IMSSP\]: The connection cannot process this operation because there is a statement with pending results. To make the connection available for other queries, either fetch all results or cancel or free the statement. For more information, see the product documentation about the MultipleActiveResultSets connection option. | ||
Statement 1 successful\. | ||
16 rows in result set\. | ||
Statement 2 successful\. | ||
9 rows in result set\. | ||
Statement 3 successful\. | ||
-1 rows in result set\. | ||
Statement 4 successful\. | ||
-1 rows in result set\. | ||
Statement 5 successful\. | ||
-1 rows in result set\. | ||
Error executing statement 6\. | ||
SQLSTATE\[08S02\]: \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]TCP Provider: (An existing connection was forcibly closed by the remote host\.|Error code 0x20) | ||
Statement 7 successful\. | ||
Error executing statement 8\. | ||
SQLSTATE\[IMSSP\]: The connection cannot process this operation because there is a statement with pending results\. To make the connection available for other queries, either fetch all results or cancel or free the statement. For more information, see the product documentation about the MultipleActiveResultSets connection option. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--TEST-- | ||
Test the connection resiliency keywords ConnectRetryCount and ConnectRetryInterval and their ranges of acceptable values | ||
--SKIPIF-- | ||
<?php require('skipif_unix.inc'); | ||
<?php require('skipif_mid-refactor.inc'); | ||
require('skipif_version_less_than_2k14.inc'); ?> | ||
--FILE-- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See my comment earlier about skipif_mid-refactor.inc |
||
<?php | ||
|
@@ -70,15 +70,15 @@ catch( PDOException $e ) | |
Connected successfully on first attempt. | ||
Connected successfully on second attempt. | ||
Could not connect on third attempt. | ||
SQLSTATE\[08001\]: \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]Invalid value specified for connection string attribute 'ConnectRetryCount' | ||
SQLSTATE\[08001\]: (\[unixODBC\]|)\[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]Invalid value specified for connection string attribute 'ConnectRetryCount' | ||
Could not connect on fourth attempt. | ||
SQLSTATE\[08001\]: \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]Invalid value specified for connection string attribute 'ConnectRetryInterval' | ||
SQLSTATE\[08001\]: (\[unixODBC\]|)\[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]Invalid value specified for connection string attribute 'ConnectRetryInterval' | ||
Could not connect on fifth attempt. | ||
SQLSTATE\[08001\]: \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]Invalid value specified for connection string attribute 'ConnectRetryCount' | ||
SQLSTATE\[08001\]: (\[unixODBC\]|)\[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]Invalid value specified for connection string attribute 'ConnectRetryCount' | ||
Could not connect on sixth attempt. | ||
SQLSTATE\[08001\]: \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]Invalid value specified for connection string attribute 'ConnectRetryCount' | ||
SQLSTATE\[08001\]: (\[unixODBC\]|)\[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]Invalid value specified for connection string attribute 'ConnectRetryCount' | ||
Could not connect on seventh attempt. | ||
SQLSTATE\[08001\]: \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]Invalid value specified for connection string attribute 'ConnectRetryInterval' | ||
SQLSTATE\[08001\]: (\[unixODBC\]|)\[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]Invalid value specified for connection string attribute 'ConnectRetryInterval' | ||
Could not connect on eighth attempt. | ||
SQLSTATE\[IMSSP\]: The DSN string ended unexpectedly. | ||
Could not connect on ninth attempt. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ Prepare a statement, break the connection, and execute the statement. Then | |
test transactions by breaking the connection before beginning a transaction | ||
and in the middle of the transaction. The latter case should fail. | ||
--SKIPIF-- | ||
<?php require('skipif_protocol_not_tcp.inc'); | ||
<?php require('skipif_mid-refactor.inc'); | ||
require('skipif_protocol_not_tcp.inc'); | ||
require('skipif_version_less_than_2k14.inc'); ?> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here... otherwise, this test will be skipped even when running against sql server 2014 |
||
--FILE-- | ||
<?php | ||
|
@@ -208,10 +209,10 @@ $conn_break = null; | |
|
||
?> | ||
--EXPECTREGEX-- | ||
Statement 1 prepared. | ||
Statement 1 executed. | ||
Transaction begun. | ||
Transaction was committed. | ||
Transaction begun. | ||
SQLSTATE\[08S02\]: \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]TCP Provider: An existing connection was forcibly closed by the remote host. | ||
Statement 1 prepared\. | ||
Statement 1 executed\. | ||
Transaction begun\. | ||
Transaction was committed\. | ||
Transaction begun\. | ||
SQLSTATE\[08S02\]: \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]TCP Provider: (An existing connection was forcibly closed by the remote host\.|Error code 0x20) | ||
SQLSTATE\[08S01\]: \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]Communication link failure |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ Test connection resiliency timeouts | |
1. Connect with ConnectRetryCount equal to 0. | ||
2. Reconnect with the default value of ConnectRetryCount(1). | ||
--SKIPIF-- | ||
<?php require('skipif_protocol_not_tcp.inc'); | ||
<?php require('skipif_mid-refactor.inc'); | ||
require('skipif_protocol_not_tcp.inc'); | ||
require('skipif_version_less_than_2k14.inc'); ?> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again this one too |
||
--FILE-- | ||
<?php | ||
|
@@ -83,6 +84,6 @@ DropTables( $server, $uid, $pwd, $tableName1, $tableName2 ); | |
|
||
?> | ||
--EXPECTREGEX-- | ||
Error executing statement 1. | ||
SQLSTATE\[08S02\]: \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]TCP Provider: An existing connection was forcibly closed by the remote host. | ||
Query successfully executed. | ||
Error executing statement 1\. | ||
SQLSTATE\[08S02\]: \[Microsoft\]\[ODBC Driver 1[1-9] for SQL Server\]TCP Provider: [An existing connection was forcibly closed by the remote host\.|Error code 0x20] | ||
Query successfully executed\. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
<?php | ||
if ( !( strtoupper( substr( php_uname( 's' ),0,3 ) ) === 'WIN' ) ) die( "Skip Test on windows only." ); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this one and the equivalent one for 2k14 need to check ODBC version? only works for 17.2 right? |
||
if (!extension_loaded("pdo_sqlsrv")) { | ||
die("skip Extension not loaded"); | ||
} | ||
|
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.
I think starting with ODBC 17 Azure AD works outside Windows too.