/php-src/ext/mysqli/ |
H A D | mysqli_nonapi.c | 161 if (mysql->mysql) { 179 php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql)); 195 mysql->mysql = NULL; 220 if (!mysql->mysql) { 255 php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql)); 256 php_mysqli_throw_sql_exception((char *)mysql_sqlstate(mysql->mysql), mysql_errno(mysql->mysql), 261 mysql->mysql = NULL; 267 php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql)); 694 if (mysql->mysql == *p) { 724 if (mysql->mysql == *p) { [all …]
|
H A D | mysqli_api.c | 46 rc = mysql_affected_rows(mysql->mysql); in PHP_FUNCTION() 67 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION() 212 MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); in PHP_FUNCTION() 241 mysqli_close(mysql->mysql, close_type); in php_mysqli_close() 247 mysqlnd_end_psession(mysql->mysql); in php_mysqli_close() 262 mysql->mysql = NULL; in php_mysqli_close() 387 RETURN_LONG(mysql_errno(mysql->mysql)); in PHP_FUNCTION() 899 RETURN_STRING((mysql->mysql->data->host_info) ? mysql->mysql->data->host_info : ""); in PHP_FUNCTION() 959 info = mysql_info(mysql->mysql); in PHP_FUNCTION() 1022 rc = mysql_insert_id(mysql->mysql); in PHP_FUNCTION() [all …]
|
H A D | mysqli_priv.h | 50 extern void php_mysqli_close(MY_MYSQL * mysql, int close_type, int resource_status); 55 extern MYSQLI_WARNING *php_get_warnings(MYSQLND_CONN_DATA * mysql); 67 #define MYSQLI_DISABLE_MQ if (mysql->multi_query) { \ 68 mysql_set_server_option(mysql->mysql, MYSQL_OPTION_MULTI_STATEMENTS_OFF); \ 69 mysql->multi_query = 0; \ 72 #define MYSQLI_ENABLE_MQ if (!mysql->multi_query) { \ 73 mysql_set_server_option(mysql->mysql, MYSQL_OPTION_MULTI_STATEMENTS_ON); \ 74 mysql->multi_query = 1; \ 110 #define MYSQLI_REPORT_MYSQL_ERROR(mysql) \ argument 111 if ((MyG(report_mode) & MYSQLI_REPORT_ERROR) && mysql_errno(mysql)) { \ [all …]
|
H A D | config.m4 | 5 /var/tmp/mysql.sock \ 6 /var/run/mysql/mysql.sock \ 7 /var/lib/mysql/mysql.sock \ 8 /var/mysql/mysql.sock \ 9 /usr/local/mysql/var/mysql.sock \ 10 /Private/tmp/mysql.sock \ 11 /private/tmp/mysql.sock \ 12 /tmp/mysql.sock \ 33 PHP_ARG_WITH([mysql-sock], 35 [AS_HELP_STRING([[--with-mysql-sock[=SOCKPATH]]],
|
H A D | mysqli.stub.php | 1345 function mysqli_close(mysqli $mysql): true {} 1372 function mysqli_errno(mysqli $mysql): int {} 1375 function mysqli_error(mysqli $mysql): string {} 1381 function mysqli_error_list(mysqli $mysql): array {} 1437 function mysqli_field_count(mysqli $mysql): int {} 1488 function mysqli_info(mysqli $mysql): ?string {} 1517 function mysqli_ping(mysqli $mysql): bool {} 1530 mysqli $mysql, 1630 function mysqli_sqlstate(mysqli $mysql): string {} 1633 mysqli $mysql, [all …]
|
/php-src/ext/mysqli/tests/ |
H A D | bug31668.phpt | 14 $mysql->multi_query('SELECT 1;SELECT 2'); 16 $res = $mysql->store_result(); 17 if ($mysql->errno == 0) { 23 } while ($mysql->next_result()); 24 var_dump($mysql->error, __LINE__); 25 $mysql->close(); 28 $mysql->multi_query('SELECT 1;SELECT 2'); 30 $res = $mysql->store_result(); 31 if ($mysql->errno == 0) { 37 } while ($mysql->next_result()); [all …]
|
H A D | bug35759.phpt | 15 $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket); 16 $mysql->query("DROP TABLE IF EXISTS test"); 24 if (!$mysql->query($create)) { 25 if (1101 == $mysql->errno) { 30 printf("[001] [%d] %s\n", $mysql->errno, $mysql->error); 33 if (!$mysql->query("INSERT INTO test (a0) VALUES ('')")) 34 printf("[002] [%d] %s\n", $mysql->errno, $mysql->error); 36 $stmt = $mysql->prepare("SELECT * FROM test"); 49 printf("[003] [%d] %s\n", $mysql->errno, $mysql->error); 52 $mysql->close();
|
H A D | 071.phpt | 13 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 15 var_dump($mysql->query('DO 1')); 17 $ret = $mysql->kill($mysql->thread_id); 22 var_dump($mysql->query('DO 1')); 24 $mysql->close(); 26 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 28 var_dump($mysql->query('DO 1')); 30 $ret = $mysql->kill($mysql->thread_id); 35 var_dump($mysql->query('DO 1')); 37 $mysql->close();
|
H A D | 065.phpt | 13 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 15 if (!mysqli_query($mysql, "SET sql_mode=''")) 16 printf("[002] Cannot set SQL-Mode, [%d] %s\n", mysqli_errno($mysql), mysqli_error($mysql)); 20 if ($mysql->set_charset("latin1")) { 22 if (3 !== ($tmp = strlen($mysql->real_escape_string($esc_str)))) 25 if ('latin1' !== ($tmp = $mysql->character_set_name())) 29 if ($res = $mysql->query("SHOW CHARACTER SET LIKE 'gbk'")) { 31 if ($mysql->set_charset("gbk")) { 34 if (2 !== ($tmp = strlen($mysql->real_escape_string($esc_str)))) 37 if ('gbk' !== ($tmp = $mysql->character_set_name())) [all …]
|
H A D | 069.phpt | 13 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 14 $mysql->multi_query('SELECT 1;SELECT 2'); 16 $res = $mysql->store_result(); 17 if ($mysql->errno == 0) { 23 if (!$mysql->more_results()) { 26 } while (@$mysql->next_result()); 27 $mysql->close();
|
H A D | bug37090.phpt | 13 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 16 $cs[] = $mysql->set_charset("latin1"); 17 $cs[] = $mysql->character_set_name(); 19 $cs[] = $mysql->set_charset("utf8"); 20 $cs[] = $mysql->character_set_name(); 22 $cs[] = $mysql->set_charset("notdefined"); 23 $cs[] = $mysql->character_set_name();
|
H A D | gh7837.phpt | 13 $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket); 14 $mysql->options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, true); 15 $mysql->query("DROP TABLE IF EXISTS test"); 16 $mysql->query("CREATE TABLE test (`ubigint` bigint unsigned NOT NULL) ENGINE=InnoDB"); 17 $mysql->query("INSERT INTO test (`ubigint`) VALUES (18446744073709551615)"); 18 $mysql->query("INSERT INTO test (`ubigint`) VALUES (9223372036854775808)"); 19 $mysql->query("INSERT INTO test (`ubigint`) VALUES (1)"); 20 $result = $mysql->query("SELECT ubigint FROM test");
|
H A D | 066.phpt | 14 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 16 if (!mysqli_query($mysql, "SET sql_mode=''")) 17 printf("[002] Cannot set SQL-Mode, [%d] %s\n", mysqli_errno($mysql), mysqli_error($mysql)); 19 $mysql->query("DROP TABLE IF EXISTS test_warnings"); 21 $mysql->query("CREATE TABLE test_warnings (a int not null) ENGINE=myisam"); 23 $mysql->query("INSERT INTO test_warnings VALUES (1),(2),(NULL)"); 25 if (($warning = $mysql->get_warnings())) { 31 $mysql->close();
|
H A D | bug28817.phpt | 23 $mysql = new my_mysql(); 25 var_dump($mysql->p_test); 27 $mysql->errno; 32 $mysql->connect($host, $user, $passwd, $db, $port, $socket); 33 $mysql->select_db("nonexistingdb"); 35 var_dump($mysql->errno > 0); 37 $mysql->close();
|
H A D | bug36802.phpt | 14 $mysql = mysqli_init(); 17 if (method_exists($mysql, 'set_charset')) { 19 $mysql->set_charset('utf8'); 28 $mysql->query("SELECT 'foo' FROM DUAL"); 34 $x[1] = ($mysql->error); 35 $x[2] = $mysql->errno; 37 $mysql->close();
|
H A D | bug35103.phpt | 18 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 19 $mysql->query("DROP TABLE IF EXISTS test_bint"); 20 $mysql->query("CREATE TABLE test_bint (a bigint(20) default NULL) ENGINE=MYISAM"); 21 …$mysql->query("INSERT INTO test_bint VALUES (9223372036854775807),(-9223372036854775808),(-2147483… 23 $mysql->query("DROP TABLE IF EXISTS test_buint"); 24 $mysql->query("CREATE TABLE test_buint (a bigint(20) unsigned default NULL)"); 25 …$mysql->query("INSERT INTO test_buint VALUES (18446744073709551615),(9223372036854775807),(9223372… 27 $stmt = $mysql->prepare("SELECT a FROM test_bint ORDER BY a"); 40 $stmt = $mysql->prepare("SELECT a FROM test_buint ORDER BY a"); 51 $mysql->multi_query($drop); [all …]
|
H A D | 067.phpt | 21 function open_cursor($mysql, $query) { 22 if (!is_object($stmt = $mysql->prepare($query))) { 24 $query, $mysql->errno, $mysql->error); 32 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 34 if (mysqli_get_server_version($mysql) < 50009) { 42 $mysql->query("DROP TABLE IF EXISTS cursor$i"); 43 $mysql->query("CREATE TABLE cursor$i (a int not null) ENGINE=" . $engine); 44 $mysql->query("INSERT INTO cursor$i VALUES (1),(2),(3),(4),(5),(6)"); 45 $stmt[$i] = open_cursor($mysql, "SELECT a FROM cursor$i"); 62 $mysql->close();
|
H A D | 072.phpt | 13 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 15 $mysql->query("DROP TABLE IF EXISTS not_exists"); 17 var_dump($mysql->warning_count); 19 $w = $mysql->get_warnings(); 25 $mysql->close();
|
H A D | bug36745.phpt | 16 $mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); 18 $mysql->query("DROP TABLE IF EXISTS litest"); 19 $mysql->query("CREATE TABLE litest (a VARCHAR(20))"); 21 $mysql->query("LOAD DATA LOCAL INFILE 'filenotfound' INTO TABLE litest"); 22 var_dump($mysql->error); 24 $mysql->close();
|
H A D | bug39457.phpt | 13 $mysql = mysqli_init(); 14 $mysql->connect($host, $user, $passwd, $db, $port, $socket); 16 $mysql->connect($host, $user, $passwd, $db, $port, $socket); 18 $mysql->close();
|
H A D | 048.phpt | 14 $mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); 16 $mysql->select_db($db); 17 $mysql->query("DROP TABLE IF EXISTS test_fetch_null"); 19 $mysql->query("CREATE TABLE test_fetch_null(col1 tinyint, col2 smallint, 27 …$mysql->query("INSERT INTO test_fetch_null(col1,col10, col11) VALUES(1,'foo1', 1000),(2,'foo2', 88… 29 …$stmt = $mysql->prepare("SELECT col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11… 40 $mysql->query("DROP TABLE IF EXISTS test_fetch_null"); 41 $mysql->close();
|
H A D | bug30967.phpt | 19 $mysql = new mysql2($host, $user, $passwd, $db, $port, $socket); 21 $mysql->query("THIS DOES NOT WORK"); 22 printf("%d\n", $mysql->errno); 24 $mysql->close();
|
H A D | bug70949.phpt | 12 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 14 $mysql->query("DROP TABLE IF EXISTS bug70949"); 15 $mysql->query("CREATE TABLE bug70949(name varchar(255))"); 16 $mysql->query("INSERT INTO bug70949 VALUES ('dummy'),(NULL),('foo'),('bar')"); 20 if ($stmt = $mysql->prepare($sql)) 40 $mysql->close();
|
H A D | 049.phpt | 14 $mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); 16 $mysql->select_db($db); 17 $result = $mysql->query("SELECT DATABASE()"); 25 $mysql->close();
|
/php-src/ext/pdo_mysql/tests/ |
H A D | pdo_mysql___construct_ini.phpt | 10 if (getenv('PDO_MYSQL_TEST_DSN') !== "mysql:dbname=phptest;unix_socket=/tmp/mysql.sock") 14 pdo.dsn.mysql="mysql:dbname=phptest;socket=/tmp/mysql.sock" 22 if ('pdo.dsn.mysql' == $name) { 23 printf("pdo.dsn.mysql=%s\n", $dsn); 29 $dsn = ini_get('pdo.dsn.mysql'); 34 printf("pdo.dsn.mysql cannot be accessed through ini_get_all()/ini_get()\n"); 42 $db = new PDO('mysql', $user, $pass); 56 pdo.dsn.mysql cannot be accessed through ini_get_all()/ini_get()
|