We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Tested in Windows with the latest sqlsrv 5.1.2-preview
The repro script:
sqlsrv_query($conn, "CREATE TABLE [test_max_fields] ( [varchar_max_col] varchar(max) COLLATE Latin1_General_BIN2 ENCRYPTED WITH (ENCRYPTION_TYPE = deterministic, ALGORITHM = 'AEAD_AES_256_CBC_HMAC_SHA_256', COLUMN_ENCRYPTION_KEY = AEColumnKey) )"); $inValue = str_repeat("ÃÜðßZZýA©", 1000); $insertSql = "INSERT INTO [test_max_fields] (varchar_max_col) VALUES (?)"; $params = array($inValue); $stmt = sqlsrv_prepare($conn, $insertSql, $params); if ($stmt) { sqlsrv_execute($stmt); } $query = "SELECT * FROM [test_max_fields]"; $stmt = sqlsrv_prepare($conn, $query); if ($stmt) { sqlsrv_execute($stmt); } if (!sqlsrv_fetch($stmt)) { fatalError("Failed to fetch row "); } $stream = sqlsrv_get_field($stmt, 0, SQLSRV_PHPTYPE_STREAM(SQLSRV_ENC_CHAR)); if ($stream === false) { fatalError("Failed to read field"); } else { $value = ''; if ($stream) { $num = 0; while (!feof($stream)) { $value .= fread($stream, 8192); // infinite loop?! } fclose($stream); if (!checkData($value, $inValue)) { // compare the data to see if they match! fatalError("Data corruption!\n"); } } else { fatalError("Error in getting stream!"); } }
The text was updated successfully, but these errors were encountered:
Resolved in 5.2.0-RC
Sorry, something went wrong.
No branches or pull requests
Tested in Windows with the latest sqlsrv 5.1.2-preview
The repro script:
The text was updated successfully, but these errors were encountered: