mirror of
https://github.com/php/pecl-database-ibm_db2.git
synced 2026-03-23 23:02:16 +01:00
Parameter 5 in db2_statistics() is defined as bool
This commit is contained in:
@@ -127,7 +127,7 @@ function db2_specialcolumns($connection, ?string $qualifier, string $schema, str
|
||||
* @param resource $connection
|
||||
* @return resource
|
||||
*/
|
||||
function db2_statistics($connection, ?string $qualifier, ?string $schema, string $table_name, bool|int $unique) {}
|
||||
function db2_statistics($connection, ?string $qualifier, ?string $schema, string $table_name, bool $unique) {}
|
||||
|
||||
/**
|
||||
* @param resource $connection
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 827c25789a2304ec0b4b9d2faec51850bc442f0c */
|
||||
* Stub hash: 0e66cf0b41d69fa0aa1514436de097e2b9d53adf */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_db2_connect, 0, 0, 3)
|
||||
ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 0)
|
||||
@@ -94,7 +94,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_db2_statistics, 0, 0, 5)
|
||||
ZEND_ARG_TYPE_INFO(0, qualifier, IS_STRING, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, schema, IS_STRING, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_MASK(0, unique, MAY_BE_BOOL|MAY_BE_LONG, NULL)
|
||||
ZEND_ARG_TYPE_INFO(0, unique, _IS_BOOL, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_db2_table_privileges, 0, 0, 1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 827c25789a2304ec0b4b9d2faec51850bc442f0c */
|
||||
* Stub hash: 0e66cf0b41d69fa0aa1514436de097e2b9d53adf */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_db2_connect, 0, 0, 3)
|
||||
ZEND_ARG_INFO(0, database)
|
||||
|
||||
@@ -52,7 +52,7 @@ if ($row) {
|
||||
}
|
||||
|
||||
/* Testing db2_statistics leaks */
|
||||
$stmt = db2_statistics($conn, NULL, NULL, NULL, 1);
|
||||
$stmt = db2_statistics($conn, NULL, NULL, NULL, true);
|
||||
$row = db2_fetch_array($stmt);
|
||||
if ($row) {
|
||||
echo "Shouldn't be here\n";
|
||||
|
||||
@@ -15,7 +15,7 @@ if ($conn) {
|
||||
$rc = db2_exec($conn, "CREATE INDEX index1 ON index_test (id)");
|
||||
|
||||
echo "Test first index table:\n";
|
||||
$result = @db2_statistics($conn,NULL,NULL,"INDEX_TEST",1);
|
||||
$result = @db2_statistics($conn,NULL,NULL,"INDEX_TEST",true);
|
||||
$row = db2_fetch_array($result);
|
||||
echo $row[2] . "\n"; // TABLE_NAME
|
||||
echo $row[3] . "\n"; // NON_UNIQUE
|
||||
@@ -28,7 +28,7 @@ if ($conn) {
|
||||
$rc = db2_exec($conn, "CREATE INDEX index2 ON index_test2 (data)");
|
||||
|
||||
echo "Test second index table:\n";
|
||||
$result = @db2_statistics($conn,NULL,NULL,"INDEX_TEST2",1);
|
||||
$result = @db2_statistics($conn,NULL,NULL,"INDEX_TEST2",true);
|
||||
$row = db2_fetch_array($result);
|
||||
echo $row[2] . "\n"; // TABLE_NAME
|
||||
echo $row[3] . "\n"; // NON_UNIQUE
|
||||
@@ -36,7 +36,7 @@ if ($conn) {
|
||||
echo $row[8] . "\n"; // COLUMN_NAME
|
||||
|
||||
echo "Test non-existent table:\n";
|
||||
$result = @db2_statistics($conn,NULL,NULL,"NON_EXISTENT_TABLE",1);
|
||||
$result = @db2_statistics($conn,NULL,NULL,"NON_EXISTENT_TABLE",true);
|
||||
$row = db2_fetch_array($result);
|
||||
if ($row) {
|
||||
echo "Non-Empty\n";
|
||||
|
||||
@@ -22,7 +22,7 @@ if ($conn) {
|
||||
$rc = db2_exec($conn, "CREATE INDEX index1 ON index_test (id)");
|
||||
|
||||
echo "Test first index table:\n";
|
||||
$result = db2_statistics($conn,NULL,NULL,"INDEX_TEST",1);
|
||||
$result = db2_statistics($conn,NULL,NULL,"INDEX_TEST",true);
|
||||
$row = db2_fetch_array($result);
|
||||
echo $row[2] . "\n"; // TABLE_NAME
|
||||
echo $row[3] . "\n"; // NON_UNIQUE
|
||||
@@ -35,7 +35,7 @@ if ($conn) {
|
||||
$rc = db2_exec($conn, "CREATE INDEX index2 ON index_test2 (data)");
|
||||
|
||||
echo "Test second index table:\n";
|
||||
$result = db2_statistics($conn,NULL,NULL,"INDEX_TEST2",1);
|
||||
$result = db2_statistics($conn,NULL,NULL,"INDEX_TEST2",true);
|
||||
$row = db2_fetch_array($result);
|
||||
echo $row[2] . "\n"; // TABLE_NAME
|
||||
echo $row[3] . "\n"; // NON_UNIQUE
|
||||
@@ -43,7 +43,7 @@ if ($conn) {
|
||||
echo $row[8] . "\n"; // COLUMN_NAME
|
||||
|
||||
echo "Test non-existent table:\n";
|
||||
$result = db2_statistics($conn,NULL,NULL,"NON_EXISTENT_TABLE",1);
|
||||
$result = db2_statistics($conn,NULL,NULL,"NON_EXISTENT_TABLE",true);
|
||||
$row = db2_fetch_array($result);
|
||||
if ($row) {
|
||||
echo "Non-Empty\n";
|
||||
|
||||
@@ -16,7 +16,7 @@ if ($conn) {
|
||||
$rc = db2_exec($conn, "CREATE INDEX index1 ON index_test (id)");
|
||||
|
||||
echo "Test first index table:\n";
|
||||
$result = db2_statistics($conn,NULL,$username,"INDEX_TEST",1);
|
||||
$result = db2_statistics($conn,NULL,$username,"INDEX_TEST",true);
|
||||
$row = db2_fetch_array($result);
|
||||
echo $row[2] . "\n"; // TABLE_NAME
|
||||
echo $row[3] . "\n"; // NON_UNIQUE
|
||||
@@ -29,7 +29,7 @@ if ($conn) {
|
||||
$rc = db2_exec($conn, "CREATE INDEX index2 ON index_test2 (data)");
|
||||
|
||||
echo "Test second index table:\n";
|
||||
$result = db2_statistics($conn,NULL,$username,"INDEX_TEST2",1);
|
||||
$result = db2_statistics($conn,NULL,$username,"INDEX_TEST2",true);
|
||||
$row = db2_fetch_array($result);
|
||||
echo $row[2] . "\n"; // TABLE_NAME
|
||||
echo $row[3] . "\n"; // NON_UNIQUE
|
||||
@@ -37,7 +37,7 @@ if ($conn) {
|
||||
echo $row[8] . "\n"; // COLUMN_NAME
|
||||
|
||||
echo "Test non-existent table:\n";
|
||||
$result = db2_statistics($conn,NULL,$username,"NON_EXISTENT_TABLE",1);
|
||||
$result = db2_statistics($conn,NULL,$username,"NON_EXISTENT_TABLE",true);
|
||||
$row = db2_fetch_array($result);
|
||||
if ($row) {
|
||||
echo "Non-Empty\n";
|
||||
|
||||
Reference in New Issue
Block a user