Merge pull request #777 from david-puglielli/bigint-x86-test-fix

Fixed bigint insertion bug in x86
This commit is contained in:
David Puglielli 2018-05-23 17:46:02 -07:00 committed by GitHub
commit 5c46d4b038
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 31 deletions

View file

@ -1,15 +1,9 @@
--TEST--
Test connection keywords for Azure Key Vault for Always Encrypted.
--SKIPIF--
<?php require('skipif.inc'); ?>
<?php require('skipif_mid-refactor.inc'); ?>
--FILE--
<?php
// Skip for 32-bit PHP, as bug causes this test to fail when inserting a bigint
if (PHP_INT_SIZE == 4) {
echo "Done.\n";
exit();
}
require_once("MsCommon_mid-refactor.inc");
require_once("MsSetup.inc");
require_once('values.php');
@ -143,7 +137,7 @@ for ($i = 0; $i < sizeof($columnEncryption); ++$i) {
// Failure expected only if the keywords/credentials are wrong
if ($stmt->execute($testValues) == false) {
print_r($stmt->errorInfo());
$stmt = null;
unset($stmt);
} else {
// The INSERT query succeeded with bad credentials, which
// should only happen when encryption is not enabled.
@ -153,8 +147,8 @@ for ($i = 0; $i < sizeof($columnEncryption); ++$i) {
}
// Free the statement and close the connection
$stmt = null;
$conn = null;
unset($stmt);
unset($conn);
} catch (Exception $e) {
$errors = $e->errorInfo;

View file

@ -1,7 +1,7 @@
--TEST--
Test credentials for Azure Key Vault for Always Encrypted.
--SKIPIF--
<?php require('skipif.inc'); ?>
<?php require('skipif_mid-refactor.inc'); ?>
--FILE--
<?php
// TODO: Fix the test on Ubuntu - right now it produces a SSL error on Ubuntu
@ -115,13 +115,13 @@ try {
echo "Successful insertion and retrieval with username/password.\n";
$stmt = null;
$stmt1 = null;
unset($stmt);
unset($stmt1);
}
// Free the statement and close the connection
$stmt = null;
$conn = null;
unset($stmt);
unset($conn);
} catch (Exception $e) {
echo "Unexpected error.\n";
print_r($e->errorInfo);
@ -190,13 +190,13 @@ try {
echo "Successful insertion and retrieval with client ID/secret.\n";
$stmt = null;
$stmt1 = null;
unset($stmt);
unset($stmt1);
}
// Free the statement and close the connection
$stmt = null;
$conn = null;
unset($stmt);
unset($conn);
} catch (Exception $e) {
echo "Unexpected error.\n";
print_r($e->errorInfo);

View file

@ -11,10 +11,6 @@ $conn = new PDO($dsn, $uid, $pwd);
if (! $conn) {
echo("Error: could not connect during SKIPIF!");
} elseif (isColEncrypted()) {
if (!(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')) {
die( "Skip, AE test on windows only." );
}
if (!isAEQualified($conn)) {
die("skip - AE feature not supported in the current environment.");
}

View file

@ -786,13 +786,14 @@ $values[] = array(array(("C0A0B025C680B0A23D7885F7C203AD211F679679F97F910F0F1A36
null,
);
// The bigint field must be inserted as a string to maintain accuracy
$small_values = array("qwerty",
"wertyu",
"ϕƆǀđIΩͰDZζ±Áɔd͋ǻĆÅũμ",
52.7878,
-1.79E+308,
-3.4E+38,
-987654321987654321,
"-9223372036854775807",
987654321,
1,
);

View file

@ -10,10 +10,6 @@ $conn = AE\connect();
if (! $conn) {
echo("Error: could not connect during SKIPIF!");
} elseif (AE\isColEncrypted()) {
if (!isWindows()) {
die( "Skip, AE test on windows only." );
}
if (!AE\isQualified($conn)) {
die("skip - AE feature not supported in the current environment.");
}

View file

@ -1,7 +1,7 @@
--TEST--
Test connection keywords for Azure Key Vault for Always Encrypted.
--SKIPIF--
<?php require('skipif.inc'); ?>
<?php require('skipif_versions_old.inc'); ?>
--FILE--
<?php
require_once('MsCommon.inc');

View file

@ -1,7 +1,7 @@
--TEST--
Test credentials for Azure Key Vault for Always Encrypted.
--SKIPIF--
<?php require('skipif.inc'); ?>
<?php require('skipif_versions_old.inc'); ?>
--FILE--
<?php
// TODO: Fix the test on Ubuntu - right now it produces a SSL error on Ubuntu

View file

@ -786,13 +786,14 @@ $values[] = array(array(("C0A0B025C680B0A23D7885F7C203AD211F679679F97F910F0F1A36
null,
);
// The bigint field must be inserted as a string to maintain accuracy
$small_values = array("qwerty",
"wertyu",
"ϕƆǀđIΩͰDZζ±Áɔd͋ǻĆÅũμ",
52.7878,
-1.79E+308,
-3.4E+38,
-987654321987654321,
"-9223372036854775807",
987654321,
1,
);