fix handling decimal type with no decimal with always encrypted
This commit is contained in:
parent
579af01b26
commit
36fef13297
|
@ -440,6 +440,9 @@ void core_sqlsrv_bind_param( _Inout_ sqlsrv_stmt* stmt, _In_ SQLUSMALLINT param_
|
|||
|
||||
if ( stmt->conn->ce_option.enabled && ( sql_type == SQL_UNKNOWN_TYPE || column_size == SQLSRV_UNKNOWN_SIZE )) {
|
||||
ae_get_sql_type_info( stmt, param_num, direction, param_z, encoding, sql_type, column_size, decimal_digits TSRMLS_CC );
|
||||
// change long to double if the sql type is decimal
|
||||
if ( sql_type == SQL_DECIMAL && Z_TYPE_P( param_z ) == IS_LONG )
|
||||
convert_to_double( param_z );
|
||||
}
|
||||
else {
|
||||
// if the sql type is unknown, then set the default based on the PHP type passed in
|
||||
|
|
|
@ -6,7 +6,7 @@ if (! extension_loaded( 'pdo' ) || ! extension_loaded( 'pdo_sqlsrv' ))
|
|||
require_once( "MsSetup.inc" );
|
||||
require_once( "MsCommon.inc" );
|
||||
|
||||
$conn = new PDO( "sqlsrv:server = $server;", $uid, $pwd );
|
||||
$conn = ae_connect();
|
||||
if( ! $conn )
|
||||
{
|
||||
echo( "Error: could not connect during SKIPIF!" );
|
||||
|
|
|
@ -4,7 +4,7 @@ if(! extension_loaded( "sqlsrv" ) )
|
|||
die( "skip extension not loaded" );
|
||||
|
||||
require_once( "MsCommon.inc" );
|
||||
$conn = Connect();
|
||||
$conn = ae_connect();
|
||||
if( ! $conn )
|
||||
{
|
||||
echo( "Error: could not connect during SKIPIF!" );
|
||||
|
|
Loading…
Reference in a new issue