From b5a0d1f8598065b53fa8e153b4399b5ac1c21820 Mon Sep 17 00:00:00 2001 From: v-kaywon Date: Fri, 13 Oct 2017 15:50:50 -0700 Subject: [PATCH] cosmetic changes --- source/shared/core_stmt.cpp | 4 ++-- test/functional/pdo_sqlsrv/pdo_bigint_outparam.phpt | 10 +++++----- test/functional/pdo_sqlsrv/pdo_bool_outparam.phpt | 10 +++++----- test/functional/sqlsrv/sqlsrv_bigint_outparam.phpt | 12 ++++++------ test/functional/sqlsrv/sqlsrv_bool_outparam.phpt | 10 +++++----- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/source/shared/core_stmt.cpp b/source/shared/core_stmt.cpp index f0823aa8..dd2d22bf 100644 --- a/source/shared/core_stmt.cpp +++ b/source/shared/core_stmt.cpp @@ -386,7 +386,7 @@ void core_sqlsrv_bind_param( _Inout_ sqlsrv_stmt* stmt, _In_ SQLUSMALLINT param_ } if( zval_was_long ){ convert_to_string( param_z ); - encoding = SQLSRV_ENCODING_SYSTEM; + encoding = SQLSRV_ENCODING_SYSTEM; match = Z_TYPE_P( param_z ) == IS_STRING; } else { @@ -565,7 +565,7 @@ void core_sqlsrv_bind_param( _Inout_ sqlsrv_stmt* stmt, _In_ SQLUSMALLINT param_ buffer, buffer_len TSRMLS_CC ); // save the parameter to be adjusted and/or converted after the results are processed - sqlsrv_output_param output_param( param_ref, encoding, param_num, static_cast( buffer_len ), zval_was_long ); + sqlsrv_output_param output_param( param_ref, encoding, param_num, static_cast( buffer_len ), zval_was_long ); save_output_param_for_later( stmt, output_param TSRMLS_CC ); diff --git a/test/functional/pdo_sqlsrv/pdo_bigint_outparam.phpt b/test/functional/pdo_sqlsrv/pdo_bigint_outparam.phpt index aef8f830..0e232694 100644 --- a/test/functional/pdo_sqlsrv/pdo_bigint_outparam.phpt +++ b/test/functional/pdo_sqlsrv/pdo_bigint_outparam.phpt @@ -12,7 +12,7 @@ $conn = connect(); $tbname = "bigint_table"; createTable($conn, $tbname, array("c1_bigint" => "bigint")); -// Create a Store Procedure +// Create a Stored Procedure $spname = "selectBigint"; $spSql = "CREATE PROCEDURE $spname (@c1_bigint bigint OUTPUT) AS SELECT @c1_bigint = c1_bigint FROM $tbname"; @@ -21,7 +21,7 @@ $conn->query($spSql); // Insert a large bigint insertRow($conn, $tbname, array("c1_bigint" => 922337203685479936)); -// Call store procedure with output +// Call stored procedure with output $outSql = "{CALL $spname (?)}"; $bigintOut = 0; $stmt = $conn->prepare($outSql); @@ -31,7 +31,7 @@ printf("Large bigint output:\n" ); var_dump($bigintOut); printf("\n"); -// Call store procedure with inout +// Call stored procedure with inout $bigintOut = 0; $stmt = $conn->prepare($outSql); $stmt->bindParam(1, $bigintOut, PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT, PDO::SQLSRV_PARAM_OUT_DEFAULT_SIZE); @@ -45,7 +45,7 @@ $conn->exec("TRUNCATE TABLE $tbname"); // Insert a small bigint insertRow($conn, $tbname, array("c1_bigint" => 922337203)); -// Call store procedure with output +// Call stored procedure with output $bigintOut = 0; $stmt = $conn->prepare($outSql); $stmt->bindParam(1, $bigintOut, PDO::PARAM_INT, PDO::SQLSRV_PARAM_OUT_DEFAULT_SIZE); @@ -54,7 +54,7 @@ printf("Small bigint output:\n" ); var_dump($bigintOut); printf("\n"); -// Call store procedure with inout +// Call stored procedure with inout $bigintOut = 0; $stmt = $conn->prepare($outSql); $stmt->bindParam(1, $bigintOut, PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT, PDO::SQLSRV_PARAM_OUT_DEFAULT_SIZE); diff --git a/test/functional/pdo_sqlsrv/pdo_bool_outparam.phpt b/test/functional/pdo_sqlsrv/pdo_bool_outparam.phpt index b1df6b9d..2048e496 100644 --- a/test/functional/pdo_sqlsrv/pdo_bool_outparam.phpt +++ b/test/functional/pdo_sqlsrv/pdo_bool_outparam.phpt @@ -12,7 +12,7 @@ $conn = connect(); $tbname = "bool_table"; createTable($conn, $tbname, array("c1_bool" => "int")); -// Create a Store Procedure +// Create a Stored Procedure $spname = "selectBool"; $spSql = "CREATE PROCEDURE $spname (@c1_bool int OUTPUT) AS SELECT @c1_bool = c1_bool FROM $tbname"; @@ -21,7 +21,7 @@ $conn->query($spSql); // Insert 1 insertRow($conn, $tbname, array("c1_bool" => 1)); -// Call store procedure with output +// Call stored procedure with output $outSql = "{CALL $spname (?)}"; $boolOut = false; $stmt = $conn->prepare($outSql); @@ -31,7 +31,7 @@ printf("True bool output:\n" ); var_dump($boolOut); printf("\n"); -// Call store procedure with inout +// Call stored procedure with inout $boolOut = false; $stmt = $conn->prepare($outSql); $stmt->bindParam(1, $boolOut, PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT, PDO::SQLSRV_PARAM_OUT_DEFAULT_SIZE); @@ -45,7 +45,7 @@ $conn->exec("TRUNCATE TABLE $tbname"); // Insert 0 insertRow($conn, $tbname, array("c1_bool" => 0)); -// Call store procedure with output +// Call stored procedure with output $boolOut = true; $stmt = $conn->prepare($outSql); $stmt->bindParam(1, $boolOut, PDO::PARAM_INT, PDO::SQLSRV_PARAM_OUT_DEFAULT_SIZE); @@ -54,7 +54,7 @@ printf("True bool output:\n" ); var_dump($boolOut); printf("\n"); -// Call store procedure with inout +// Call stored procedure with inout $boolOut = true; $stmt = $conn->prepare($outSql); $stmt->bindParam(1, $boolOut, PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT, PDO::SQLSRV_PARAM_OUT_DEFAULT_SIZE); diff --git a/test/functional/sqlsrv/sqlsrv_bigint_outparam.phpt b/test/functional/sqlsrv/sqlsrv_bigint_outparam.phpt index b25ed185..a3aaf8a3 100644 --- a/test/functional/sqlsrv/sqlsrv_bigint_outparam.phpt +++ b/test/functional/sqlsrv/sqlsrv_bigint_outparam.phpt @@ -13,16 +13,16 @@ $tbname = "bigint_table"; AE\createTable($conn, $tbname, array(new AE\ColumnMeta("bigint", "c1_bigint"))); -// Create a Store Procedure with output +// Create a Stored Procedure with output $spname = "selectBigint"; $spSql = "CREATE PROCEDURE $spname (@c1_bigint bigint OUTPUT) AS SELECT @c1_bigint = c1_bigint FROM $tbname"; sqlsrv_query( $conn, $spSql ); // Insert a large bigint -AE\insertRow($conn, $tbname, array("c1_bigint" => 922337203685479936)); +AE\insertRow($conn, $tbname, array("c1_bigint" => 922,337,203,685,479,936)); -// Call store procedure with SQLSRV_PARAM_OUT +// Call stored procedure with SQLSRV_PARAM_OUT $outSql = "{CALL $spname (?)}"; $bigintOut = 0; $stmt = sqlsrv_prepare($conn, $outSql, array(array(&$bigintOut, SQLSRV_PARAM_OUT))); @@ -31,7 +31,7 @@ printf("Large bigint output:\n"); var_dump($bigintOut); printf("\n"); -// Call store procedure with SQLSRV_PARAM_INOUT +// Call stored procedure with SQLSRV_PARAM_INOUT $bigintOut = 0; $stmt = sqlsrv_prepare($conn, $outSql, array(array(&$bigintOut, SQLSRV_PARAM_INOUT))); sqlsrv_execute($stmt); @@ -43,7 +43,7 @@ sqlsrv_query($conn, "TRUNCATE TABLE $tbname"); // Insert a small bigint AE\insertRow($conn, $tbname, array("c1_bigint" => 922337203)); -// Call store procedure with SQLSRV_PARAM_OUT +// Call stored procedure with SQLSRV_PARAM_OUT $bigintOut = 0; $stmt = sqlsrv_prepare($conn, $outSql, array(array(&$bigintOut, SQLSRV_PARAM_OUT))); sqlsrv_execute($stmt); @@ -51,7 +51,7 @@ printf("Small bigint output:\n"); var_dump($bigintOut); printf("\n"); -// Call store procedure with SQLSRV_PARAM_INOUT +// Call stored procedure with SQLSRV_PARAM_INOUT $bigintOut = 0; $stmt = sqlsrv_prepare($conn, $outSql, array(array(&$bigintOut, SQLSRV_PARAM_INOUT))); sqlsrv_execute($stmt); diff --git a/test/functional/sqlsrv/sqlsrv_bool_outparam.phpt b/test/functional/sqlsrv/sqlsrv_bool_outparam.phpt index a07aa91c..45ba3fed 100644 --- a/test/functional/sqlsrv/sqlsrv_bool_outparam.phpt +++ b/test/functional/sqlsrv/sqlsrv_bool_outparam.phpt @@ -13,7 +13,7 @@ $tbname = "bool_table"; AE\createTable($conn, $tbname, array(new AE\ColumnMeta("int", "c1_bool"))); -// Create a Store Procedure with output +// Create a Stored Procedure with output $spname = "selectBool"; $spSql = "CREATE PROCEDURE $spname (@c1_bool int OUTPUT) AS SELECT @c1_bool = c1_bool FROM $tbname"; @@ -22,7 +22,7 @@ sqlsrv_query( $conn, $spSql ); // Insert 1 AE\insertRow($conn, $tbname, array("c1_bool" => 1)); -// Call store procedure with SQLSRV_PARAM_OUT +// Call stored procedure with SQLSRV_PARAM_OUT $outSql = "{CALL $spname (?)}"; $boolOut = false; $stmt = sqlsrv_prepare($conn, $outSql, array(array(&$boolOut, SQLSRV_PARAM_OUT, SQLSRV_PHPTYPE_INT))); @@ -31,7 +31,7 @@ printf("True bool output:\n"); var_dump($boolOut); printf("\n"); -// Call store procedure with SQLSRV_PARAM_INOUT +// Call stored procedure with SQLSRV_PARAM_INOUT $boolOut = false; $stmt = sqlsrv_prepare($conn, $outSql, array(array(&$boolOut, SQLSRV_PARAM_INOUT, SQLSRV_PHPTYPE_INT))); sqlsrv_execute($stmt); @@ -43,7 +43,7 @@ sqlsrv_query($conn, "TRUNCATE TABLE $tbname"); // Insert 0 AE\insertRow($conn, $tbname, array("c1_bool" => 0)); -// Call store procedure with SQLSRV_PARAM_OUT +// Call stored procedure with SQLSRV_PARAM_OUT $boolOut = true; $stmt = sqlsrv_prepare($conn, $outSql, array(array(&$boolOut, SQLSRV_PARAM_OUT, SQLSRV_PHPTYPE_INT))); sqlsrv_execute($stmt); @@ -51,7 +51,7 @@ printf("False bool output:\n"); var_dump($boolOut); printf("\n"); -// Call store procedure with SQLSRV_PARAM_INOUT +// Call stored procedure with SQLSRV_PARAM_INOUT $boolOut = true; $stmt = sqlsrv_prepare($conn, $outSql, array(array(&$boolOut, SQLSRV_PARAM_INOUT, SQLSRV_PHPTYPE_INT))); sqlsrv_execute($stmt);