Skip to content

Commit 98ff5a8

Browse files
authored
Merge pull request #1503 from microsoft/dev
Merge to master for 5.12.0 release
2 parents 00faac1 + e253bcd commit 98ff5a8

File tree

5 files changed

+87
-40
lines changed

5 files changed

+87
-40
lines changed

CHANGELOG.md

+35
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,41 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55

6+
## 5.12.0 - 2024-01-31
7+
Updated PECL release packages. Here is the list of updates:
8+
9+
### Added
10+
- Support for PHP 8.3
11+
- Support for Alpine 3.19
12+
13+
### Removed
14+
- Support for PHP 8.0
15+
- Support for Ubuntu 18.04
16+
- Support for Alpine 3.15
17+
18+
### Fixed
19+
- Update connection string keywords set function (#1484)
20+
- Fix error throw for multiple result sets (#1485)
21+
- Fix invalid precision error (#1497)
22+
23+
### Limitations
24+
- No support for inout / output params when using sql_variant type
25+
- No support for inout / output params when formatting decimal values
26+
- In Linux and macOS, setlocale() only takes effect if it is invoked before the first connection. Attempting to set the locale after connecting will not work
27+
- Always Encrypted requires [MS ODBC Driver 17+](https://docs.microsoft.com/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server)
28+
- Only Windows Certificate Store and Azure Key Vault are supported. Custom Keystores are not yet supported
29+
- Issue [#716](https://github.com/Microsoft/msphpsql/issues/716) - With Always Encrypted enabled, named parameters in subqueries are not supported
30+
- Issue [#1050](https://github.com/microsoft/msphpsql/issues/1050) - With Always Encrypted enabled, insertion requires the column list for any tables with identity columns
31+
- [Always Encrypted limitations](https://docs.microsoft.com/sql/connect/php/using-always-encrypted-php-drivers#limitations-of-the-php-drivers-when-using-always-encrypted)
32+
33+
### Known Issues
34+
- This release requires ODBC Driver 17.4.2 or above. Otherwise, a warning about failing to set an attribute may be suppressed when using an older ODBC driver.
35+
- Connection pooling on Linux or macOS is not recommended with [unixODBC](http://www.unixodbc.org/) < 2.3.7
36+
- When pooling is enabled in Linux or macOS
37+
- unixODBC <= 2.3.4 (Linux and macOS) might not return proper diagnostic information, such as error messages, warnings and informative messages
38+
- due to this unixODBC bug, fetch large data (such as xml, binary) as streams as a workaround. See the examples [here](https://github.com/Microsoft/msphpsql/wiki/Features#pooling)
39+
40+
641
## 5.12.0-beta1 - 2023-12-08
742
Updated PECL release packages. Here is the list of updates:
843

source/shared/core_stmt.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ void core_sqlsrv_bind_param( _Inout_ sqlsrv_stmt* stmt, _In_ SQLUSMALLINT param_
392392
} else {
393393
SQLSRV_ASSERT(false, "sqlsrv_params_container::insert_param - Invalid parameter direction.");
394394
}
395+
395396
stmt->params_container.insert_param(param_num, new_param);
396397
param_ptr = new_param;
397398
new_param.transferred();
@@ -2508,9 +2509,6 @@ void sqlsrv_param::bind_param(_Inout_ sqlsrv_stmt* stmt)
25082509
}
25092510

25102511
core::SQLBindParameter(stmt, param_pos + 1, direction, c_data_type, sql_data_type, column_size, decimal_digits, buffer, buffer_length, &strlen_or_indptr);
2511-
if (!stmt->conn->ce_option.enabled && !stmt->format_decimals) {
2512-
sql_data_type = SQL_UNKNOWN_TYPE;
2513-
}
25142512
}
25152513

25162514
void sqlsrv_param::init_data_from_zval(_Inout_ sqlsrv_stmt* stmt)

source/shared/version.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#define SQLVERSION_BUILD 0
3232

3333
// For previews, set this constant to 1, 2 and so on. Otherwise, set it to 0
34-
#define PREVIEW 1
34+
#define PREVIEW 0
3535
#define SEMVER_PRERELEASE
3636

3737
// Semantic versioning build metadata, build meta data is not counted in precedence order.
@@ -59,7 +59,7 @@
5959
#define _FILEVERSION SQLVERSION_MAJOR,SQLVERSION_MINOR,SQLVERSION_PATCH,SQLVERSION_BUILD
6060

6161
// PECL package version ('-' or '+' is not allowed) - to support Pickle do not use macros below
62-
#define PHP_SQLSRV_VERSION "5.12.0beta1"
63-
#define PHP_PDO_SQLSRV_VERSION "5.12.0beta1"
62+
#define PHP_SQLSRV_VERSION "5.12.0"
63+
#define PHP_PDO_SQLSRV_VERSION "5.12.0"
6464

6565
#endif // VERSION_H
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
--TEST--
2+
HY104 Invalid precision value when reusing prepared statement
3+
--SKIPIF--
4+
<?php require('skipif_versions_old.inc'); ?>
5+
--FILE--
6+
<?php
7+
set_time_limit(0);
8+
sqlsrv_configure('WarningsReturnAsErrors', 0);
9+
sqlsrv_configure('LogSeverity', SQLSRV_LOG_SEVERITY_ALL);
10+
11+
require_once('MsCommon.inc');
12+
13+
$conn = connect(array('CharacterSet'=>'UTF-8'));
14+
if (!$conn) {
15+
fatalError("Failed to connect");
16+
}
17+
18+
$tableName = 'php_test_table';
19+
$column = array(new AE\ColumnMeta("VARCHAR(8000)", "TestColumn", "NULL"));
20+
21+
$stmt = AE\createTable($conn, $tableName, $column);
22+
if (!$stmt) {
23+
fatalError("Failed to create table $tableName\n");
24+
}
25+
26+
$query = "INSERT INTO $tableName (TestColumn) VALUES (?)";
27+
$parameterValue = "Test value.";
28+
$parameterReference[0] = [ & $parameterValue, SQLSRV_PARAM_IN, null, SQLSRV_SQLTYPE_VARCHAR('8000') ];
29+
$queryHandle = sqlsrv_prepare($conn, $query, $parameterReference);
30+
31+
$r1 = sqlsrv_execute($queryHandle);
32+
if ($r1 === false) {
33+
print_r(sqlsrv_errors(SQLSRV_ERR_ALL));
34+
}
35+
36+
$r2 = sqlsrv_execute($queryHandle);
37+
if ($r2 === false) {
38+
print_r(sqlsrv_errors(SQLSRV_ERR_ALL));
39+
}
40+
41+
dropTable($conn, $tableName);
42+
sqlsrv_close($conn);
43+
44+
echo "Done\n";
45+
46+
?>
47+
--EXPECT--
48+
Done

test/functional/sqlsrv/sqlsrv_github_1448.phpt

-34
This file was deleted.

0 commit comments

Comments
 (0)