/PHP-8.0/ext/dba/tests/ |
H A D | bug70825.phpt | 13 dba_insert('foo', 23, $db); 14 dba_insert('foo', 42, $db); 15 dba_insert('foo', 1337, $db); 19 dba_close($db); 29 dba_close($db); 33 dba_insert('[foo]bar', 23, $db); 34 dba_insert('[foo]bar', 42, $db); 39 dba_close($db); 43 dba_insert('[foo]bar', 23, $db); 44 dba_insert('[foo]bar', 42, $db); [all …]
|
/PHP-8.0/ext/pdo_mysql/tests/ |
H A D | pdo_mysql_rollback.phpt | 8 $db = MySQLPDOTest::factory(); 18 $db->beginTransaction(); 29 $db->rollBack(); 35 $db->beginTransaction(); 41 $db->rollBack(); 52 $db->beginTransaction(); 54 $db->rollBack(); 64 $db->rollBack(); 70 $db->rollBack(); 76 $db->commit(); [all …]
|
H A D | pdo_mysql_stmt_bindparam_types.phpt | 8 $db = MySQLPDOTest::factory(); 13 $db = MySQLPDOTest::factory(); 14 MySQLPDOTest::createTestTable($db); 19 $db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 0); 21 $db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 1); 23 $db->exec('DROP TABLE IF EXISTS test'); 41 $stmt = $db->query('SELECT id, label FROM test'); 90 $db->exec('DROP TABLE IF EXISTS test'); 103 // pdo_mysql_stmt_bindparam_types($db, 2, 'BIT(8)', 1); 106 pdo_mysql_stmt_bindparam_types($db, 5, 'BOOLEAN', 1); [all …]
|
H A D | pdo_mysql_begintransaction.phpt | 8 $db = MySQLPDOTest::factory(); 23 $db->errorCode(), implode(' ', $db->errorInfo())); 32 $db = null; 48 if (!$db->commit()) 70 if (!$db->commit()) 125 $db->commit(); 138 $db->errorCode(), implode(' ', $db->errorInfo())); 154 $db->errorCode(), implode(' ', $db->errorInfo())); 162 if (!$db->commit()) 167 $db->errorCode(), implode(' ', $db->errorInfo())); [all …]
|
H A D | pdo_mysql_types.phpt | 15 $db->exec('DROP TABLE IF EXISTS test'); 17 @$db->exec($sql); 18 if ($db->errorCode() != 0) { 86 $db = MySQLPDOTest::factory(); 92 test_type($db, 20, 'BIT(8)', 1); 106 test_type($db, 100, 'INT', -2147483648, 135 test_type($db, 340, 'TIME', '14:37:00'); 140 test_type($db, 380, 'CHAR(1)', 'a'); 143 test_type($db, 410, 'VARCHAR(1)', 'a'); 180 $db = MySQLPDOTest::factory(); [all …]
|
H A D | pdo_mysql_exec_ddl.phpt | 16 $ret = @$db->exec($sql); 18 $ret = $db->exec($sql); 23 $db->errorCode(), implode(' ', $db->errorInfo())); 29 $offset, $sql, $db->errorCode(), implode(' ', $db->errorInfo())); 37 $db = MySQLPDOTest::factory(); 38 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); 76 $db->errorCode(), implode(' ', $db->errorInfo())); 83 $db = MySQLPDOTest::factory(); 84 MySQLPDOTest::dropTestTable($db); 86 @$db->exec('DROP TABLE IF EXISTS pdo_exec_ddl'); [all …]
|
H A D | pdo_mysql_inTransaction.phpt | 16 $db = MySQLPDOTest::factory(); 45 $db->beginTransaction(); 47 $db->exec($end); 51 $db->exec('START TRANSACTION'); 52 var_dump($db->inTransaction()); 53 $db->rollBack(); 54 var_dump($db->inTransaction()); 57 $db->commit(); 62 $db->beginTransaction(); 68 $db->beginTransaction(); [all …]
|
H A D | pdo_mysql_errorcode.phpt | 8 $db = MySQLPDOTest::factory(); 13 $db = MySQLPDOTest::factory(); 14 MySQLPDOTest::createTestTable($db); 35 $code = $db->errorCode(); 36 check_error(2, $db); 40 check_error(3, $db); 45 check_error(4, $db); 51 check_error(7, $db, '42S02'); 55 check_error(8, $db); 58 $db2 = &$db; [all …]
|
H A D | pdo_mysql_stmt_getcolumnmeta.phpt | 9 $db = MySQLPDOTest::factory(); 10 $stmt = $db->query('SELECT VERSION() as _version'); 19 $db = MySQLPDOTest::factory(); 21 MySQLPDOTest::createTestTable($db); 63 $db->exec('DROP TABLE IF EXISTS test'); 73 $db->errorCode(), var_export($db->errorInfo(), true)); 228 $db->exec('DROP TABLE IF EXISTS test'); 249 $db->exec('DROP TABLE IF EXISTS test'); 270 $db->exec('DROP TABLE IF EXISTS test'); 298 $e->getMessage(), $db->errorInfo(), implode(' ', $db->errorInfo())); [all …]
|
H A D | bug_pecl_12925.phpt | 9 $db = MySQLPDOTest::factory(); 14 $db = MySQLPDOTest::factory(); 16 function bug_pecl_1295($db) { 18 $db->exec('DROP TABLE IF EXISTS test'); 19 $db->exec('CREATE TABLE test(id CHAR(1))'); 25 $stmt = $db->prepare('SELECT id FROM test'); 33 $db = MySQLPDOTest::factory(); 35 bug_pecl_1295($db); 38 $db = MySQLPDOTest::factory(); 40 bug_pecl_1295($db); [all …]
|
H A D | pdo_mysql_stmt_nextrowset.phpt | 8 $db = MySQLPDOTest::factory(); 34 function test_proc1($db) { 74 test_proc1($db); 75 test_proc2($db); 81 test_proc1($db); 82 test_proc2($db); 90 test_proc1($db); 91 test_proc2($db); 98 test_proc1($db); 99 test_proc2($db); [all …]
|
H A D | pdo_mysql_last_insert_id.phpt | 8 $db = MySQLPDOTest::factory(); 13 $db = MySQLPDOTest::factory(); 16 if ('0' !== ($tmp = $db->lastInsertId())) 24 $db->exec('DROP TABLE IF EXISTS test'); 25 if ('0' !== ($tmp = $db->lastInsertId())) 29 if ('0' !== ($tmp = $db->lastInsertId())) 57 $next_id = (int)$db->lastInsertId(); 71 $next_id = (int)$db->lastInsertId(); 101 … printf("[014] %s, [%s} %s\n", $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo())); 104 @$db->exec('UNLOCK TABLE test'); [all …]
|
H A D | bug80458.phpt | 14 $db = MySQLPDOTest::factory(); 18 $db->query('DROP TABLE IF EXISTS test'); 44 $db->exec('DROP PROCEDURE IF EXISTS nores'); 46 $stmt4 = $db->prepare('CALL nores()'); 51 $db->exec('DROP PROCEDURE IF EXISTS ret'); 53 $stmt5 = $db->prepare('CALL ret()'); 58 $db->exec('DROP PROCEDURE IF EXISTS ret'); 87 $stmt4 = $db->prepare('CALL nores()'); 92 $db->exec('DROP PROCEDURE IF EXISTS ret'); 94 $stmt5 = $db->prepare('CALL ret()'); [all …]
|
H A D | pdo_mysql_commit.phpt | 8 $db = MySQLPDOTest::factory(); 15 $db = MySQLPDOTest::factory(); 16 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); 27 $db->commit(); 47 if (true !== ($tmp = $db->commit())) 49 $db->errorCode(), implode(' ', $db->errorInfo())); 61 $db = MySQLPDOTest::factory(); 70 $db->errorCode(), implode(' ', $db->errorInfo())); 83 $db->errorCode(), implode(' ', $db->errorInfo())); 90 $db = MySQLPDOTest::factory(); [all …]
|
H A D | pdo_mysql_errorinfo.phpt | 8 $db = MySQLPDOTest::factory(); 13 $db = MySQLPDOTest::factory(); 14 MySQLPDOTest::createTestTable($db); 45 $code = $db->errorCode(); 46 check_error($offset + 2, $db); 50 check_error($offset + 3, $db); 55 check_error($offset + 5, $db); 67 $db2 = &$db; 85 $offset + 19, $e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo())); 91 pdo_mysql_errorinfo($db, 0); [all …]
|
H A D | bug79375.phpt | 15 $db = MySQLPDOTest::factory(); 18 return $db; 21 $db = createDB(); 29 $db->exec("START TRANSACTION"); 45 $stmt = $db->prepare($query); 60 $stmt = $db->prepare($query); 73 unset($db); 77 $db = createDB(); 81 unset($db); 85 $db = createDB(); [all …]
|
/PHP-8.0/ext/pgsql/tests/ |
H A D | 05large_object.phpt | 10 $db = pg_connect($conn_str); 13 pg_exec ($db, "begin"); 14 $oid = pg_lo_create ($db); 20 pg_exec ($db, "commit"); 23 pg_exec ($db, "begin"); 29 pg_exec ($db, "commit"); 32 pg_exec ($db, "begin"); 37 pg_exec ($db, "commit"); 40 pg_exec ($db, "begin"); 46 pg_exec ($db, "begin"); [all …]
|
H A D | 02connection.phpt | 11 $db = pg_pconnect($conn_str); 12 var_dump($db); 14 if (pg_connection_status($db) != PGSQL_CONNECTION_OK) 18 if (!pg_connection_reset($db)) 22 if (pg_connection_busy($db)) 32 if (false === pg_host($db)) 36 if (!pg_dbname($db)) 40 if (!pg_port($db)) 44 if (pg_tty($db)) 48 if (pg_options($db)) [all …]
|
H A D | 31nb_async_query_prepared.phpt | 14 $db = pg_connect($conn_str); 16 $version = pg_version($db); 22 $db_socket = pg_socket($db); 29 nb_flush($db, $db_socket); 32 nb_consume($db, $db_socket); 43 nb_flush($db, $db_socket); 46 nb_consume($db, $db_socket); 81 nb_flush($db, $db_socket); 84 nb_consume($db, $db_socket); 98 nb_consume($db, $db_socket); [all …]
|
H A D | 26async_query_prepared.phpt | 13 $db = pg_connect($conn_str); 15 $version = pg_version($db); 20 while(pg_connection_busy($db)); // busy wait: intended 21 if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) { 24 if (!($result = pg_get_result($db))) 30 if (!pg_send_execute($db, 'php_test', array(100))) { 33 while(pg_connection_busy($db)); // busy wait: intended 37 if (!($result = pg_get_result($db))) 79 if (!($result = pg_get_result($db))) 93 if (!($result = pg_get_result($db))) [all …]
|
H A D | 06copy_2.phpt | 10 $db = pg_connect($conn_str); 12 pg_query($db, 'CREATE TABLE test_copy (x int)'); 14 pg_query($db, 'COPY test_copy FROM STDIN'); 16 pg_put_line($db, "1\n"); 17 pg_put_line($db, "\\N\n"); 18 pg_put_line($db, "\\.\n"); 19 pg_end_copy($db); 21 var_dump(pg_fetch_all_columns(pg_query($db, 'SELECT * FROM test_copy ORDER BY 1'))); 23 pg_query($db, 'DROP TABLE test_copy');
|
/PHP-8.0/ext/pdo_dblib/tests/ |
H A D | bug_38955.phpt | 13 $db->query("CREATE table php_test(val int)"); 14 $db->beginTransaction(); 15 $db->query("INSERT INTO php_test(val) values(1)"); 16 $db->query("INSERT INTO php_test(val) values(2)"); 17 $db->query("INSERT INTO php_test(val) values(3)"); 18 $db->query("INSERT INTO php_test(val) values(4)"); 19 $db->commit(); 22 $db->beginTransaction(); 27 $db->rollback(); 29 $rs = $db->query("SELECT * FROM php_test"); [all …]
|
H A D | pdo_dblib_quote.phpt | 11 var_dump($db->quote(true, PDO::PARAM_BOOL)); 12 var_dump($db->quote(false, PDO::PARAM_BOOL)); 13 var_dump($db->quote(42, PDO::PARAM_INT)); 14 var_dump($db->quote(null, PDO::PARAM_NULL)); 15 var_dump($db->quote('\'', PDO::PARAM_STR)); 16 var_dump($db->quote('foo', PDO::PARAM_STR)); 17 var_dump($db->quote('foo', PDO::PARAM_STR | PDO::PARAM_STR_CHAR)); 18 var_dump($db->quote('über', PDO::PARAM_STR | PDO::PARAM_STR_NATL)); 21 $db->setAttribute(PDO::ATTR_DEFAULT_STR_PARAM, PDO::PARAM_STR_NATL); 24 var_dump($db->quote('foo', PDO::PARAM_STR | PDO::PARAM_STR_CHAR)); [all …]
|
/PHP-8.0/ext/pdo_pgsql/tests/ |
H A D | bug48764.phpt | 10 $db = PDOTest::factory(); 27 bug($db); 30 bug($db, array(PDO::ATTR_EMULATE_PREPARES => 0)); 31 bug($db, array(PDO::ATTR_EMULATE_PREPARES => 1)); 34 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1); 35 bug($db); 36 $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0); 37 bug($db); 42 $db = PDOTest::factory('PDO', false); 46 bug($db); [all …]
|
H A D | gh9411.phpt | 13 $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); 17 $db->beginTransaction(); 18 $oid = $db->pgsqlLOBCreate(); 19 var_dump($lob = $db->pgsqlLOBOpen($oid, 'wb')); 21 $db->rollback(); 24 $db->beginTransaction(); 25 $oid = $db->pgsqlLOBCreate(); 26 var_dump($lob = $db->pgsqlLOBOpen($oid, 'wb')); 28 $db->commit(); 31 $db->beginTransaction(); [all …]
|