Skip to content

Commit 236774b

Browse files
authored
Merge pull request #50 from phansys/db2_statistics
Parameter 5 in `db2_statistics()` is defined as `bool`
2 parents f4bfd69 + f7858b0 commit 236774b

7 files changed

+14
-14
lines changed

ibm_db2.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function db2_specialcolumns($connection, ?string $qualifier, string $schema, str
127127
* @param resource $connection
128128
* @return resource
129129
*/
130-
function db2_statistics($connection, ?string $qualifier, ?string $schema, string $table_name, bool|int $unique) {}
130+
function db2_statistics($connection, ?string $qualifier, ?string $schema, string $table_name, bool $unique) {}
131131

132132
/**
133133
* @param resource $connection

ibm_db2_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 827c25789a2304ec0b4b9d2faec51850bc442f0c */
2+
* Stub hash: 0e66cf0b41d69fa0aa1514436de097e2b9d53adf */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_db2_connect, 0, 0, 3)
55
ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 0)
@@ -94,7 +94,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_db2_statistics, 0, 0, 5)
9494
ZEND_ARG_TYPE_INFO(0, qualifier, IS_STRING, 1)
9595
ZEND_ARG_TYPE_INFO(0, schema, IS_STRING, 1)
9696
ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
97-
ZEND_ARG_TYPE_MASK(0, unique, MAY_BE_BOOL|MAY_BE_LONG, NULL)
97+
ZEND_ARG_TYPE_INFO(0, unique, _IS_BOOL, 0)
9898
ZEND_END_ARG_INFO()
9999

100100
ZEND_BEGIN_ARG_INFO_EX(arginfo_db2_table_privileges, 0, 0, 1)

ibm_db2_legacy_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 827c25789a2304ec0b4b9d2faec51850bc442f0c */
2+
* Stub hash: 0e66cf0b41d69fa0aa1514436de097e2b9d53adf */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_db2_connect, 0, 0, 3)
55
ZEND_ARG_INFO(0, database)

tests/test_10353_MemLeak.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ if ($row) {
5252
}
5353

5454
/* Testing db2_statistics leaks */
55-
$stmt = db2_statistics($conn, NULL, NULL, NULL, 1);
55+
$stmt = db2_statistics($conn, NULL, NULL, NULL, true);
5656
$row = db2_fetch_array($stmt);
5757
if ($row) {
5858
echo "Shouldn't be here\n";

tests/test_197_StatisticsIndexes.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if ($conn) {
1515
$rc = db2_exec($conn, "CREATE INDEX index1 ON index_test (id)");
1616

1717
echo "Test first index table:\n";
18-
$result = @db2_statistics($conn,NULL,NULL,"INDEX_TEST",1);
18+
$result = @db2_statistics($conn,NULL,NULL,"INDEX_TEST",true);
1919
$row = db2_fetch_array($result);
2020
echo $row[2] . "\n"; // TABLE_NAME
2121
echo $row[3] . "\n"; // NON_UNIQUE
@@ -28,15 +28,15 @@ if ($conn) {
2828
$rc = db2_exec($conn, "CREATE INDEX index2 ON index_test2 (data)");
2929

3030
echo "Test second index table:\n";
31-
$result = @db2_statistics($conn,NULL,NULL,"INDEX_TEST2",1);
31+
$result = @db2_statistics($conn,NULL,NULL,"INDEX_TEST2",true);
3232
$row = db2_fetch_array($result);
3333
echo $row[2] . "\n"; // TABLE_NAME
3434
echo $row[3] . "\n"; // NON_UNIQUE
3535
echo $row[5] . "\n"; // INDEX_NAME
3636
echo $row[8] . "\n"; // COLUMN_NAME
3737

3838
echo "Test non-existent table:\n";
39-
$result = @db2_statistics($conn,NULL,NULL,"NON_EXISTENT_TABLE",1);
39+
$result = @db2_statistics($conn,NULL,NULL,"NON_EXISTENT_TABLE",true);
4040
$row = db2_fetch_array($result);
4141
if ($row) {
4242
echo "Non-Empty\n";

tests/test_V6_197_StatisticsIndexes.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if ($conn) {
2222
$rc = db2_exec($conn, "CREATE INDEX index1 ON index_test (id)");
2323

2424
echo "Test first index table:\n";
25-
$result = db2_statistics($conn,NULL,NULL,"INDEX_TEST",1);
25+
$result = db2_statistics($conn,NULL,NULL,"INDEX_TEST",true);
2626
$row = db2_fetch_array($result);
2727
echo $row[2] . "\n"; // TABLE_NAME
2828
echo $row[3] . "\n"; // NON_UNIQUE
@@ -35,15 +35,15 @@ if ($conn) {
3535
$rc = db2_exec($conn, "CREATE INDEX index2 ON index_test2 (data)");
3636

3737
echo "Test second index table:\n";
38-
$result = db2_statistics($conn,NULL,NULL,"INDEX_TEST2",1);
38+
$result = db2_statistics($conn,NULL,NULL,"INDEX_TEST2",true);
3939
$row = db2_fetch_array($result);
4040
echo $row[2] . "\n"; // TABLE_NAME
4141
echo $row[3] . "\n"; // NON_UNIQUE
4242
echo $row[5] . "\n"; // INDEX_NAME
4343
echo $row[8] . "\n"; // COLUMN_NAME
4444

4545
echo "Test non-existent table:\n";
46-
$result = db2_statistics($conn,NULL,NULL,"NON_EXISTENT_TABLE",1);
46+
$result = db2_statistics($conn,NULL,NULL,"NON_EXISTENT_TABLE",true);
4747
$row = db2_fetch_array($result);
4848
if ($row) {
4949
echo "Non-Empty\n";

tests/test_V6_197_StatisticsIndexes_with_lib_1028_issue.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if ($conn) {
1616
$rc = db2_exec($conn, "CREATE INDEX index1 ON index_test (id)");
1717

1818
echo "Test first index table:\n";
19-
$result = db2_statistics($conn,NULL,$username,"INDEX_TEST",1);
19+
$result = db2_statistics($conn,NULL,$username,"INDEX_TEST",true);
2020
$row = db2_fetch_array($result);
2121
echo $row[2] . "\n"; // TABLE_NAME
2222
echo $row[3] . "\n"; // NON_UNIQUE
@@ -29,15 +29,15 @@ if ($conn) {
2929
$rc = db2_exec($conn, "CREATE INDEX index2 ON index_test2 (data)");
3030

3131
echo "Test second index table:\n";
32-
$result = db2_statistics($conn,NULL,$username,"INDEX_TEST2",1);
32+
$result = db2_statistics($conn,NULL,$username,"INDEX_TEST2",true);
3333
$row = db2_fetch_array($result);
3434
echo $row[2] . "\n"; // TABLE_NAME
3535
echo $row[3] . "\n"; // NON_UNIQUE
3636
echo $row[5] . "\n"; // INDEX_NAME
3737
echo $row[8] . "\n"; // COLUMN_NAME
3838

3939
echo "Test non-existent table:\n";
40-
$result = db2_statistics($conn,NULL,$username,"NON_EXISTENT_TABLE",1);
40+
$result = db2_statistics($conn,NULL,$username,"NON_EXISTENT_TABLE",true);
4141
$row = db2_fetch_array($result);
4242
if ($row) {
4343
echo "Non-Empty\n";

0 commit comments

Comments
 (0)