/PHP-8.2/ext/pdo_pgsql/tests/ |
H A D | bug67462.phpt | 4 pdo 9 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 15 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 16 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); 17 $pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); 19 $pdo->beginTransaction(); 23 $pdo->query("INSERT INTO b67462 VALUES (1), (1)"); 25 var_dump($pdo->inTransaction()); 26 $pdo->commit(); // This should fail! 28 var_dump($pdo->inTransaction()); [all …]
|
H A D | bug66584.phpt | 4 pdo 9 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 14 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 15 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); 19 $pdo->beginTransaction(); 21 $pdo->query("CREATE TABLE b66584 (a int)"); 22 $pdo->query("INSERT INTO b66584 VALUES (165)"); 28 run($pdo, [0 => 1, 2 => 165, 5 => 3]); 41 $pdo->query("DROP TABLE b66584"); 42 $pdo->rollback(); [all …]
|
H A D | bug69344.phpt | 4 pdo 9 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 15 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 16 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); 17 $pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); 18 $pdo->setAttribute (\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC); 20 $test = function () use ($pdo) { 26 $stmt = $pdo->prepare("SELECT (?)::text AS a, (?)::text AS b"); 38 $pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, true);
|
H A D | bug81343.phpt | 4 pdo 9 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 14 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 15 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); 16 $pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); 17 $sth = $pdo->prepare("select false where 2=?");
|
H A D | bug64953.phpt | 4 pdo 9 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 16 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 17 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); 18 $pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); 22 $st = $pdo->prepare('SELECT ?::char as i'); 28 $st = $pdo->prepare('SELECT (?)::char as i'); 35 $st = $pdo->prepare("SELECT :int::int as i"); 39 $st = $pdo->prepare("SELECT '''?'''::text as \":text\"");
|
H A D | bug69752.phpt | 4 pdo 9 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 14 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 15 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); 17 $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); 19 $pdo->beginTransaction(); 21 $pdo->exec(" 30 $stmt = $pdo->prepare("insert into foo (field1, field2, field3, field4) values (:field1, :field2, :… 53 $pdo->rollBack();
|
H A D | bug72294.phpt | 4 pdo 9 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 14 require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 104 public function prepare( $pdo, $sql ) 106 //return $pdo->prepare( $sql ); 107 $this->cached_statements[$sql] = $pdo->prepare( $sql ); 117 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); 119 $prepared_statement_cache = new PreparedStatementCache( $pdo ); 122 $statement = $prepared_statement_cache->prepare( $pdo, <<<SQL 132 $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); [all …]
|
/PHP-8.2/ext/pdo/ |
H A D | Makefile.frag | 14 …$(RE2C) $(RE2C_FLAGS) --no-generation-date -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re; \ 17 install-pdo-headers: 19 @$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/pdo 22 $(INSTALL_DATA) $(top_srcdir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ 24 $(INSTALL_DATA) $(top_builddir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ 26 $(INSTALL_DATA) $(top_srcdir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ 28 $(INSTALL_DATA) $(top_builddir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ 35 install: $(all_targets) $(install_targets) install-pdo-headers
|
H A D | config.m4 | 1 PHP_ARG_ENABLE([pdo], 3 [AS_HELP_STRING([--disable-pdo], 12 PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared) 13 PHP_ADD_EXTENSION_DEP(pdo, spl, true) 14 PHP_INSTALL_HEADERS(ext/pdo, [php_pdo.h php_pdo_driver.h php_pdo_error.h])
|
H A D | config.w32 | 3 ARG_ENABLE("pdo", "Enable PHP Data Objects support", "no"); 6 …EXTENSION('pdo', 'pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c', false /* force stat… 7 ADD_EXTENSION_DEP('pdo', 'spl', true); 9 PHP_INSTALL_HEADERS("ext/pdo", "php_pdo.h php_pdo_driver.h php_pdo_error.h");
|
H A D | Makefile.frag.w32 | 1 ext\pdo\pdo_sql_parser.c: ext\pdo\pdo_sql_parser.re 3 $(RE2C) $(RE2C_FLAGS) --no-generation-date -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re
|
/PHP-8.2/ext/pdo_mysql/tests/ |
H A D | bug80808.phpt | 14 $pdo = MySQLPDOTest::factory(); 16 $pdo->exec('DROP TABLE IF EXISTS test'); 17 $pdo->exec('CREATE TABLE test (postcode INT(4) UNSIGNED ZEROFILL)'); 18 $pdo->exec('INSERT INTO test (postcode) VALUES (\'0800\')'); 20 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); 21 var_dump($pdo->query('SELECT * FROM test')->fetchColumn(0)); 22 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); 23 var_dump($pdo->query('SELECT * FROM test')->fetchColumn(0));
|
H A D | bug75177.phpt | 14 $pdo = MySQLPDOTest::factory(); 17 $pdo->query("DROP TABLE IF EXISTS $tbl"); 18 $pdo->query("CREATE TABLE $tbl (`bit` bit(8)) ENGINE=InnoDB"); 19 $pdo->query("INSERT INTO $tbl (`bit`) VALUES (1)"); 20 $pdo->query("INSERT INTO $tbl (`bit`) VALUES (0b011)"); 21 $pdo->query("INSERT INTO $tbl (`bit`) VALUES (0b01100)"); 23 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); 24 $ret = $pdo->query("SELECT * FROM $tbl")->fetchAll(); 29 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); 30 $ret = $pdo->query("SELECT * FROM $tbl")->fetchAll();
|
H A D | bug76815.phpt | 14 $pdo = MySQLPDOTest::factory(); 15 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 17 $pdo->query('DROP FUNCTION IF EXISTS tst'); 18 $pdo->query('DROP PROCEDURE IF EXISTS tst2'); 19 $pdo->query('CREATE FUNCTION tst() RETURNS VARCHAR(5) DETERMINISTIC BEGIN RETURN \'x12345\'; END'); 20 $pdo->query('CREATE PROCEDURE tst2() BEGIN SELECT tst(); END'); 22 $st = $pdo->prepare('CALL tst2()'); 35 $pdo = MySQLPDOTest::factory(); 36 $pdo->query('DROP FUNCTION IF EXISTS tst'); 37 $pdo->query('DROP PROCEDURE IF EXISTS tst2');
|
H A D | bug63185.phpt | 4 pdo 15 $pdo = MySQLPDOTest::factory(); 16 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 18 $pdo->exec('DROP PROCEDURE IF EXISTS test_procedure_error_at_second'); 19 $pdo->exec('CREATE PROCEDURE test_procedure_error_at_second () 25 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); 26 $st = $pdo->query('CALL test_procedure_error_at_second()'); 35 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); 36 $st = $pdo->query('CALL test_procedure_error_at_second()'); 49 $pdo = MySQLPDOTest::factory(); [all …]
|
H A D | unsigned_bigint.phpt | 4 pdo 16 $pdo = MySQLPDOTest::factory(); 19 $pdo->query("DROP TABLE IF EXISTS $tbl"); 20 $pdo->query("CREATE TABLE $tbl (`ubigint` bigint unsigned NOT NULL) ENGINE=InnoDB"); 21 $pdo->query("INSERT INTO $tbl (`ubigint`) VALUES (18446744073709551615)"); 22 $pdo->query("INSERT INTO $tbl (`ubigint`) VALUES (9223372036854775808)"); 23 $pdo->query("INSERT INTO $tbl (`ubigint`) VALUES (1)"); 24 $result = $pdo->query("SELECT ubigint FROM $tbl")->fetchAll(PDO::FETCH_ASSOC);
|
H A D | bug70066.phpt | 4 pdo 16 $pdo = MySQLPDOTest::factory(); 17 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 18 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0); 20 $db = $pdo->query('SELECT DATABASE()')->fetchColumn(0); 23 $pdo->query('USE ' . $db);
|
H A D | bug79596.phpt | 18 $pdo = MySQLPDOTest::factory(); 19 $pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false); 20 $pdo->query('CREATE TABLE bug79596 (broken FLOAT(2,1))'); 21 $pdo->query('INSERT INTO bug79596 VALUES(4.9)'); 22 var_dump($pdo->query('SELECT broken FROM bug79596')->fetchColumn(0)); 28 $pdo = MySQLPDOTest::factory(); 29 $pdo->exec("DROP TABLE IF EXISTS bug79596");
|
H A D | bug81037.phpt | 4 pdo 15 $pdo = MySQLPDOTest::factory(); 16 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 17 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); 18 MySQLPDOTest::createTestTable($pdo); 21 $stmt = $pdo->prepare($sql);
|
H A D | bug79132.phpt | 14 $pdo = MySQLPDOTest::factory(); 15 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 17 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); 18 test($pdo); 20 $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); 21 test($pdo); 23 function test($pdo) { 24 $stmt = $pdo->prepare('select ? a, ? b');
|
H A D | gh11550.phpt | 4 pdo 14 $pdo = MySQLPDOTest::factory(); 16 $pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); 18 $pdo->exec(<<<'SQL' 26 $pdo->exec(<<<'SQL' 30 $stmt = $pdo->prepare('select * from test_gh11550'); 35 $pdo->exec(<<<'SQL' 46 $pdo = MySQLPDOTest::factory(); 47 $pdo->query('DROP TABLE IF EXISTS test_gh11550');
|
/PHP-8.2/ext/pdo/tests/ |
H A D | bug_38253.phpt | 4 pdo 14 if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); 16 $pdo = PDOTest::factory(); 18 $pdo->exec ("create table test (id integer primary key, n varchar(255))"); 19 $pdo->exec ("INSERT INTO test (id, n) VALUES (1, 'hi')"); 21 $pdo->setAttribute (PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_CLASS); 22 $stmt = $pdo->prepare ("SELECT * FROM test"); 26 $pdo->setAttribute (PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_FUNC); 27 $stmt = $pdo->prepare ("SELECT * FROM test");
|
H A D | bug_44159.phpt | 2 PDO Common: Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL)) 4 pdo 14 if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); 16 $pdo = PDOTest::factory(); 17 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); 23 var_dump($pdo->setAttribute($attr, NULL)); 28 var_dump($pdo->setAttribute($attr, 1)); 33 var_dump($pdo->setAttribute($attr, 'nonsense'));
|
H A D | pdo_quote_empty_string.phpt | 4 pdo 14 if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); 17 $pdo = PDOTest::factory(); 18 $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 21 $result = $pdo->quote('');
|
/PHP-8.2/ext/pdo_odbc/tests/ |
H A D | gh16450.phpt | 17 $pdo = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=$dbpath;Uid=Admin;Pwd=;"… 19 $pdo->exec("CREATE TABLE gh16450 (Id INT, MyLongText LONGCHAR)"); 20 $pdo->exec(sprintf("INSERT INTO gh16450 VALUES (1, '%s')", str_repeat("_", 2048))); 21 $pdo->exec(sprintf("INSERT INTO gh16450 VALUES (1, '%s')", str_repeat("_", 2049))); 23 $stmt = $pdo->query("SELECT MyLongText FROM gh16450"); 30 $pdo = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=$dbpath;Uid=Admin;Pwd=;"… 31 $pdo->exec("DROP TABLE gh16450");
|