/PHP-8.3/ext/pdo/ |
H A D | pdo_dbh.c | 568 stmt->dbh = dbh; in PHP_METHOD() 616 if (dbh->methods->begin(dbh)) { in PHP_METHOD() 640 if (dbh->methods->commit(dbh)) { in PHP_METHOD() 664 if (dbh->methods->rollback(dbh)) { in PHP_METHOD() 1072 dbh->methods->fetch_err(dbh, dbh->query_stmt, return_value); in PHP_METHOD() 1129 stmt->dbh = dbh; in PHP_METHOD() 1250 if (!dbh || !dbh->methods || !dbh->methods->get_driver_methods) { in pdo_hash_methods() 1388 dbh->methods->closer(dbh); in dbh_free() 1416 pefree(dbh, dbh->is_persistent); in dbh_free() 1428 if (dbh->driver_data && dbh->methods && dbh->methods->rollback && pdo_is_in_transaction(dbh)) { in pdo_dbh_free_storage() [all …]
|
H A D | php_pdo_error.h | 22 PDO_API void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt); 25 strlcpy(dbh->error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE)); \ 26 if (dbh->query_stmt) { \ 27 dbh->query_stmt = NULL; \ 28 zval_ptr_dtor(&dbh->query_stmt_zval); \ 32 #define PDO_HANDLE_DBH_ERR() if (strcmp(dbh->error_code, PDO_ERR_NONE)) { pdo_handle_error(dbh, … 33 …DLE_STMT_ERR() if (strcmp(stmt->error_code, PDO_ERR_NONE)) { pdo_handle_error(stmt->dbh, stmt); }
|
/PHP-8.3/ext/pdo_mysql/ |
H A D | mysql_driver.c | 81 dbh->is_persistent); in _pdo_mysql_error() 88 dbh->is_persistent); in _pdo_mysql_error() 94 dbh->is_persistent); in _pdo_mysql_error() 114 if (!dbh->methods) { in _pdo_mysql_error() 207 pdo_mysql_error(dbh); in mysql_handle_preparer() 225 pdo_mysql_error(dbh); in mysql_handle_preparer() 266 pdo_mysql_error(dbh); in mysql_handle_doer() 721 dbh->driver_data = H; 933 dbh->username = pestrdup(vars[5].optval, dbh->is_persistent); 937 dbh->password = pestrdup(vars[6].optval, dbh->is_persistent); [all …]
|
/PHP-8.3/ext/pdo_firebird/tests/ |
H A D | ddl.phpt | 16 @$dbh->exec('DROP TABLE ddl'); 17 @$dbh->exec('DROP GENERATOR gen_ddl_id'); 18 @$dbh->exec('DROP TRIGGER ddl_bi'); 21 $dbh->exec("CREATE GENERATOR gen_ddl_id"); 25 $dbh->setAttribute(PDO::ATTR_AUTOCOMMIT,0); 27 $dbh->beginTransaction(); 30 $dbh->rollback(); 32 $dbh->beginTransaction(); 33 var_dump($dbh->exec("DELETE FROM ddl")); 34 $dbh->commit(); [all …]
|
H A D | rowCount.phpt | 15 @$dbh->exec('DROP TABLE testz'); 17 $dbh->exec("INSERT INTO testz VALUES ('A')"); 18 $dbh->exec("INSERT INTO testz VALUES ('A')"); 19 $dbh->exec("INSERT INTO testz VALUES ('B')"); 20 $dbh->commit(); 24 $stmt = $dbh->prepare($query); 34 $dbh->commit(); 36 $stmt = $dbh->prepare('DELETE FROM testz'); 40 $dbh->commit(); 42 $dbh->exec('DROP TABLE testz'); [all …]
|
H A D | bug_48877.phpt | 17 @$dbh->exec('DROP TABLE testz'); 18 $dbh->exec('CREATE TABLE testz (A integer)'); 19 $dbh->exec("INSERT INTO testz VALUES ('1')"); 20 $dbh->exec("INSERT INTO testz VALUES ('2')"); 21 $dbh->exec("INSERT INTO testz VALUES ('3')"); 22 $dbh->commit(); 26 $stmt = $dbh->prepare($query); 34 $stmt = $dbh->prepare('DELETE FROM testz'); 37 $dbh->commit(); 39 $dbh->exec('DROP TABLE testz'); [all …]
|
H A D | bug_64037.phpt | 14 $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); 15 @$dbh->exec('DROP TABLE price'); 17 $dbh->exec("INSERT INTO PRICE (ID, TEXT, COST) VALUES (1, 'test', -1.0)"); 18 $dbh->exec("INSERT INTO PRICE (ID, TEXT, COST) VALUES (2, 'test', -0.99)"); 19 $dbh->exec("INSERT INTO PRICE (ID, TEXT, COST) VALUES (3, 'test', -1.01)"); 21 $dbh->commit(); 24 $stmt = $dbh->prepare($query); 32 $stmt = $dbh->prepare('DELETE FROM price'); 35 $dbh->commit(); 37 $dbh->exec('DROP TABLE price'); [all …]
|
H A D | bug_47415.phpt | 13 $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); 14 @$dbh->exec('DROP TABLE testz'); 15 $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); 17 $dbh->exec('CREATE TABLE testz (idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); 18 $dbh->exec('INSERT INTO testz VALUES(0, \'String0\')'); 20 $dbh->commit(); 24 $stmt = $dbh->prepare($query); 33 $stmt = $dbh->prepare('DELETE FROM testz'); 36 $dbh->commit(); 39 unset($dbh);
|
H A D | bug_62024.phpt | 14 $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); 15 @$dbh->exec('DROP TABLE test_insert'); 16 $dbh->exec("CREATE TABLE test_insert (ID INTEGER NOT NULL, TEXT VARCHAR(10))"); 18 $dbh->commit(); 23 $sttmt = $dbh->prepare($sql); 34 $dbh->commit(); 38 $sttmt = $dbh->prepare('DELETE FROM test_insert'); 41 $dbh->commit(); 43 $dbh->exec('DROP TABLE test_insert'); 46 unset($dbh);
|
H A D | gh10908.phpt | 31 $dbh->exec($sql); 34 function query_and_dump($dbh, $sql) { 35 foreach ($dbh->query($sql) as $row) { 41 query_and_dump($dbh, "SELECT CODE FROM gh10908"); // works fine 42 query_and_dump($dbh, "SELECT ID FROM gh10908"); // Used to "bus error" 43 query_and_dump($dbh, "SELECT NUM FROM gh10908"); // Used to "bus error" 44 query_and_dump($dbh, "SELECT DBL FROM gh10908"); // Used to "bus error" 45 query_and_dump($dbh, "SELECT TS FROM gh10908"); // Used to "bus error" 46 query_and_dump($dbh, "SELECT MYBLOB FROM gh10908"); // Used to "bus error" 47 query_and_dump($dbh, "SELECT * FROM gh10908"); // Used to "bus error" [all …]
|
H A D | gh13119.phpt | 15 $dbh->exec('CREATE TABLE gh13119 (f_val FLOAT, d_val DOUBLE PRECISION)'); 17 $dbh->exec('INSERT INTO gh13119 VALUES (0.1, 0.1)'); 18 $dbh->exec('INSERT INTO gh13119 VALUES (0.0000000000000001, 0.0000000000000001)'); 19 $dbh->exec('INSERT INTO gh13119 VALUES (12.000000, 12.00000000000000)'); 20 $dbh->exec('INSERT INTO gh13119 VALUES (12.000001, 12.00000000000001)'); 21 $dbh->exec('INSERT INTO gh13119 VALUES (12.345678, 12.34567890123456)'); 22 $dbh->exec('INSERT INTO gh13119 VALUES (0.0000000000000000012345678, 0.0000000000000000012345678901… 24 $stmt = $dbh->query('select * from gh13119'); 30 @$dbh->exec('DROP TABLE gh13119'); 31 unset($dbh);
|
/PHP-8.3/ext/pdo_odbc/ |
H A D | odbc_driver.c | 102 if (!dbh->methods) { in pdo_odbc_error() 136 dbh->driver_data = NULL; in odbc_handle_closer() 269 if (dbh->auto_commit) { in odbc_handle_begin() 298 if (dbh->auto_commit) { in odbc_handle_commit() 351 if (dbh->in_txn) { in odbc_handle_set_attr() 476 dbh->driver_data = H; in pdo_odbc_handle_factory() 530 bool is_uid_set = dbh->username && *dbh->username in pdo_odbc_handle_factory() 533 bool is_pwd_set = dbh->password && *dbh->password in pdo_odbc_handle_factory() 545 uid = dbh->username; in pdo_odbc_handle_factory() 552 pwd = dbh->password; in pdo_odbc_handle_factory() [all …]
|
/PHP-8.3/ext/pdo_firebird/ |
H A D | firebird_driver.c | 478 if (dbh->in_txn) { in firebird_handle_closer() 491 RECORD_ERROR(dbh); in firebird_handle_closer() 577 RECORD_ERROR(dbh); in firebird_handle_preparer() 615 RECORD_ERROR(dbh); in firebird_handle_doer() 623 RECORD_ERROR(dbh); in firebird_handle_doer() 651 RECORD_ERROR(dbh); in firebird_handle_doer() 657 RECORD_ERROR(dbh); in firebird_handle_doer() 749 RECORD_ERROR(dbh); in firebird_handle_begin() 796 if (dbh->auto_commit && !dbh->in_txn) { in firebird_alloc_prepare_stmt() 1052 dbh->username = pestrdup(vars[4].optval, dbh->is_persistent); in pdo_firebird_handle_factory() [all …]
|
/PHP-8.3/ext/pdo_pgsql/ |
H A D | pgsql_driver.c | 191 ZVAL_COPY_VALUE(&self->dbh, dbh); in pdo_pgsql_create_lob_stream() 199 Z_ADDREF_P(dbh); in pdo_pgsql_create_lob_stream() 590 dbh->in_txn = pgsql_handle_in_transaction(dbh); in pgsql_handle_commit() 610 pdo_dbh_t *dbh; in PHP_METHOD() local 723 pdo_dbh_t *dbh; in PHP_METHOD() local 821 pdo_dbh_t *dbh; in PHP_METHOD() local 915 pdo_dbh_t *dbh; in PHP_METHOD() local 991 pdo_dbh_t *dbh; in PHP_METHOD() local 1019 pdo_dbh_t *dbh; in PHP_METHOD() local 1070 pdo_dbh_t *dbh; in PHP_METHOD() local [all …]
|
/PHP-8.3/ext/pdo_oci/tests/ |
H A D | pdo_oci_attr_autocommit_2.phpt | 15 $dbh = PDOTest::factory(); 25 $dbh->beginTransaction(); 29 $dbh->commit(); 34 $dbh->rollback(); 39 $dbh->beginTransaction(); 43 $dbh->commit(); 48 $dbh->rollback(); 58 $dbh->rollback(); 73 $dbh->rollback(); 86 $dbh->exec("rollback"); [all …]
|
H A D | pdo_oci_attr_prefetch_1.phpt | 16 $dbh = PDOTest::factory(); 20 $dbh = PDOTest::factory(); 22 echo $dbh->getAttribute(PDO::ATTR_PREFETCH), "\n"; 25 $s = $dbh->prepare("select dummy from dual" ); 32 $dbh->setAttribute(PDO::ATTR_PREFETCH, 102); 33 echo $dbh->getAttribute(PDO::ATTR_PREFETCH), "\n"; 36 $s = $dbh->prepare("select dummy from dual" ); 43 $dbh->setAttribute(PDO::ATTR_PREFETCH, -1); 44 echo $dbh->getAttribute(PDO::ATTR_PREFETCH), "\n"; 47 $s = $dbh->prepare("select dummy from dual" ); [all …]
|
H A D | pdo_oci_attr_nulls_1.phpt | 16 function do_query($dbh) 18 var_dump($dbh->getAttribute(PDO::ATTR_ORACLE_NULLS)); 19 $s = $dbh->prepare("select '' as myempty, null as mynull from dual"); 27 $dbh = PDOTest::factory(); 30 do_query($dbh); 33 $dbh->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_NATURAL); // No conversion. 35 do_query($dbh); 38 $dbh->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_EMPTY_STRING); // Empty string is converted to… 40 do_query($dbh); 43 $dbh->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_TO_STRING); // NULL is converted to an empty s… [all …]
|
H A D | pdo_oci_attr_case.phpt | 16 function do_query1($dbh) 18 var_dump($dbh->getAttribute(PDO::ATTR_CASE)); 19 $s = $dbh->prepare("select dummy from dual"); 26 function do_query2($dbh, $mode) 36 $dbh = PDOTest::factory(); 40 $dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); 41 do_query1($dbh); 45 do_query1($dbh); 48 $dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_UPPER); 49 do_query1($dbh); [all …]
|
/PHP-8.3/ext/pdo_dblib/ |
H A D | dblib_driver.c | 89 pefree(H, dbh->is_persistent); in dblib_handle_closer() 90 dbh->driver_data = NULL; in dblib_handle_closer() 485 php_pdo_parse_data_source(dbh->data_source, dbh->data_source_len, vars, nvars); in pdo_dblib_handle_factory() 542 dbh->username = pestrdup(vars[6].optval, dbh->is_persistent); in pdo_dblib_handle_factory() 545 if (dbh->username) { in pdo_dblib_handle_factory() 552 dbh->password = pestrdup(vars[7].optval, dbh->is_persistent); in pdo_dblib_handle_factory() 555 if (dbh->password) { in pdo_dblib_handle_factory() 604 dbh->max_escaped_char_length = 2; in pdo_dblib_handle_factory() 605 dbh->alloc_own_columns = 1; in pdo_dblib_handle_factory() 614 dbh->methods = &dblib_methods; in pdo_dblib_handle_factory() [all …]
|
/PHP-8.3/ext/pdo_sqlite/ |
H A D | sqlite_driver.c | 77 if (!dbh->methods) { in _pdo_sqlite_error() 189 pdo_sqlite_error(dbh); in sqlite_handle_preparer() 198 pdo_sqlite_error(dbh); in sqlite_handle_preparer() 208 pdo_sqlite_error(dbh); in sqlite_handle_doer() 242 pdo_sqlite_error(dbh); in sqlite_handle_begin() 253 pdo_sqlite_error(dbh); in sqlite_handle_commit() 521 pdo_dbh_t *dbh; in PHP_METHOD() local 587 pdo_dbh_t *dbh; in PHP_METHOD() local 637 pdo_dbh_t *dbh; in PHP_METHOD() local 787 dbh->driver_data = H; in pdo_sqlite_handle_factory() [all …]
|
/PHP-8.3/ext/pgsql/tests/ |
H A D | bug47199.phpt | 14 $dbh = pg_connect($conn_str); 16 @pg_query($dbh, "DROP TABLE $tbl_name"); 17 pg_query($dbh, "CREATE TABLE $tbl_name (null_field INT, not_null_field INT NOT NULL)"); 19 pg_insert($dbh, $tbl_name, array('null_field' => null, 'not_null_field' => 1)); 20 pg_insert($dbh, $tbl_name, array('null_field' => null, 'not_null_field' => 2)); 22 var_dump(pg_fetch_all(pg_query($dbh, 'SELECT * FROM '. $tbl_name))); 24 $query = pg_delete($dbh, $tbl_name, array('null_field' => NULL,'not_null_field' => 2), PGSQL_DML_ST… 28 $query = pg_update($dbh, $tbl_name, array('null_field' => NULL, 'not_null_field' => 0), array('not_… 32 var_dump(pg_fetch_all(pg_query($dbh, 'SELECT * FROM '. $tbl_name))); 34 @pg_query($dbh, "DROP TABLE $tbl_name"); [all …]
|
H A D | 80_bug24499.phpt | 14 $dbh = @pg_connect($conn_str); 15 if (!$dbh) { 19 @pg_query($dbh, "DROP SEQUENCE id_id_seq"); 20 @pg_query($dbh, "DROP TABLE id"); 21 pg_query($dbh, "CREATE TABLE id (id SERIAL, t INT)"); 24 pg_query($dbh, "INSERT INTO id (t) VALUES ($i)"); 33 global $dbh; 35 $q = pg_query($dbh, "SELECT id FROM id"); 47 pg_close($dbh);
|
H A D | 80_bug32223b.phpt | 28 $dbh = pg_connect($conn_str); 29 if (!$dbh) { 33 _set_lc_messages($dbh); 35 $res = pg_query($dbh, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' 42 $res = pg_query($dbh, 'SET client_min_messages TO NOTICE;'); 45 function tester($dbh) { 46 $res = pg_query($dbh, 'SELECT test_notice()'); 52 var_dump(pg_last_notice($dbh)); 55 tester($dbh); 57 pg_close($dbh);
|
H A D | 80_bug39971.phpt | 14 $dbh = @pg_connect($conn_str); 15 if (!$dbh) { 19 pg_query($dbh, "CREATE TABLE php_test (id SERIAL, tm timestamp NOT NULL)"); 22 pg_insert($dbh, 'php_test', $values); 25 pg_update($dbh, 'php_test', $values, $ids); 27 pg_query($dbh, "DROP TABLE php_test"); 28 pg_close($dbh);
|
/PHP-8.3/ext/pdo_oci/ |
H A D | oci_driver.c | 154 dbh->is_closed = 1; in _oci_error() 337 (dbh->auto_commit && !dbh->in_txn) ? OCI_COMMIT_ON_SUCCESS : OCI_DEFAULT); in oci_handle_doer() 443 if (dbh->in_txn) { in oci_handle_set_attribute() 739 dbh->driver_data = H; in pdo_oci_handle_factory() 741 dbh->skip_param_evt = in pdo_oci_handle_factory() 806 dbh->username = pestrdup(vars[2].optval, dbh->is_persistent); in pdo_oci_handle_factory() 809 if (dbh->username) { in pdo_oci_handle_factory() 811 dbh->username, (ub4) strlen(dbh->username), in pdo_oci_handle_factory() 821 dbh->password = pestrdup(vars[3].optval, dbh->is_persistent); in pdo_oci_handle_factory() 824 if (dbh->password) { in pdo_oci_handle_factory() [all …]
|