/PHP-5.6/ext/mysqli/ |
H A D | mysqli_nonapi.c | 147 if (mysql->mysql && mysqli_resource && 182 if (!mysql_ping(mysql->mysql)) { 191 mysql->mysql = NULL; 218 if (!mysql->mysql) { 249 php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql) TSRMLS_CC); 255 mysql->mysql = NULL; 261 php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql) TSRMLS_CC); 451 if (mysql_errno(mysql->mysql)) { 721 if (mysql->mysql == *p) { 762 if (mysql->mysql == *p) { [all …]
|
H A D | mysqli_api.c | 157 rc = mysql_affected_rows(mysql->mysql); in PHP_FUNCTION() 652 old_charset = mysql->mysql->charset; in PHP_FUNCTION() 716 mysqlnd_end_psession(mysql->mysql); in php_mysqli_close() 736 mysql->mysql = NULL; in php_mysqli_close() 864 RETURN_LONG(mysql_errno(mysql->mysql)); 880 err = mysql_error(mysql->mysql); 1455 RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info : "", 1); 1457 RETURN_STRING((mysql->mysql->data->host_info) ? mysql->mysql->data->host_info : "", 1); 1526 info = mysql_info(mysql->mysql); 1593 rc = mysql_insert_id(mysql->mysql); [all …]
|
H A D | mysqli_priv.h | 70 extern MYSQLI_WARNING *php_get_warnings(MYSQLND_CONN_DATA * mysql TSRMLS_DC); 72 extern MYSQLI_WARNING *php_get_warnings(MYSQL * mysql TSRMLS_DC); 90 #define MYSQLI_DISABLE_MQ if (mysql->multi_query) { \ 91 mysql_set_server_option(mysql->mysql, MYSQL_OPTION_MULTI_STATEMENTS_OFF); \ 92 mysql->multi_query = 0; \ 95 #define MYSQLI_ENABLE_MQ if (!mysql->multi_query) { \ 96 mysql_set_server_option(mysql->mysql, MYSQL_OPTION_MULTI_STATEMENTS_ON); \ 97 mysql->multi_query = 1; \ 141 #define MYSQLI_REPORT_MYSQL_ERROR(mysql) \ argument 142 if ((MyG(report_mode) & MYSQLI_REPORT_ERROR) && mysql_errno(mysql)) { \ [all …]
|
H A D | mysqli_prop.c | 160 MY_MYSQL *mysql; in link_affected_rows_read() local 169 if (!mysql) { in link_affected_rows_read() 174 rc = mysql_affected_rows(mysql->mysql); in link_affected_rows_read() 197 MY_MYSQL *mysql; in link_error_list_read() local 206 if (mysql) { in link_error_list_read() 208 if (mysql->mysql->data->error_info->error_list) { in link_error_list_read() 225 if (mysql_errno(mysql->mysql)) { in link_error_list_read() 258 MY_MYSQL *mysql; in MYSQLI_MAP_PROPERTY_FUNC_STRING() local 271 if (mysql) { in MYSQLI_MAP_PROPERTY_FUNC_STRING() 275 if (mysqlnd_stat(mysql->mysql, &stat_msg, &stat_msg_len) == PASS) { in MYSQLI_MAP_PROPERTY_FUNC_STRING() [all …]
|
/PHP-5.6/ext/mysql/tests/ |
H A D | mysql_phpinfo.phpt | 2 phpinfo() mysql section 19 if (!stristr($phpinfo, "mysql support")) 25 if (!stristr($phpinfo, "mysql.default_host")) 28 if (!stristr($phpinfo, "mysql.default_port")) 31 if (!stristr($phpinfo, "mysql.default_password")) 34 if (!stristr($phpinfo, "mysql.default_socket")) 37 if (!stristr($phpinfo, "mysql.default_user")) 40 if (!stristr($phpinfo, "mysql.max_links")) 43 if (!stristr($phpinfo, "mysql.max_persistent")) 46 if (!stristr($phpinfo, "mysql.connect_timeout")) [all …]
|
H A D | mysql_pconnect.phpt | 9 mysql.max_persistent=10 10 mysql.allow_persistent=1 42 ini_set('mysql.default_socket', $socket); 49 ini_set('mysql.default_socket', null); 52 ini_set('mysql.default_port', $port); 54 printf("[006] Usage of mysql.default_port failed\n") ; 59 ini_set('mysql.default_password', $passwd); 66 ini_set('mysql.default_user', $user); 68 printf("[008] Usage of mysql.default_user failed\n"); 73 ini_set('mysql.default_host', $myhost); [all …]
|
H A D | mysql_connect.phpt | 40 ini_set('mysql.default_socket', $socket); 43 printf("[006] Usage of mysql.default_socket failed\n"); 51 ini_set('mysql.default_port', $port); 54 printf("[007] Usage of mysql.default_port failed\n"); 60 ini_set('mysql.default_password', $passwd); 66 ini_set('mysql.default_user', $user); 68 printf("[009] Usage of mysql.default_user failed\n"); 73 ini_set('mysql.default_host', $myhost); 75 printf("[010] Usage of mysql.default_host failed\n") ; 81 printf("[011] Usage of mysql.default_host failed\n") ; [all …]
|
H A D | setupdefault.inc | 3 // copy variables from connect.inc into mysql default connection ini settings, so that implicit mys… 6 ini_set('mysql.default_host', $host); 7 ini_set('mysql.default_user', $user); 8 ini_set('mysql.default_password', $passwd);
|
/PHP-5.6/ext/mysqli/tests/ |
H A D | bug31668.phpt | 15 $mysql->multi_query('SELECT 1;SELECT 2'); 17 $res = $mysql->store_result(); 18 if ($mysql->errno == 0) { 24 } while ($mysql->next_result()); 25 var_dump($mysql->error, __LINE__); 26 $mysql->close(); 29 $mysql->multi_query('SELECT 1;SELECT 2'); 31 $res = $mysql->store_result(); 32 if ($mysql->errno == 0) { 38 } while ($mysql->next_result()); [all …]
|
H A D | bug35759.phpt | 14 $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket); 15 $mysql->query("DROP TABLE IF EXISTS test"); 23 if (!$mysql->query($create)) { 24 if (1101 == $mysql->errno) { 29 printf("[001] [%d] %s\n", $mysql->errno, $mysql->error); 32 if (!$mysql->query("INSERT INTO test (a0) VALUES ('')")) 33 printf("[002] [%d] %s\n", $mysql->errno, $mysql->error); 35 $stmt = $mysql->prepare("SELECT * FROM test"); 48 printf("[003] [%d] %s\n", $mysql->errno, $mysql->error); 51 $mysql->close();
|
H A D | 069.phpt | 12 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 13 $mysql->multi_query('SELECT 1;SELECT 2'); 15 $res = $mysql->store_result(); 16 if ($mysql->errno == 0) { 22 if (!$mysql->more_results()) { 25 } while (@$mysql->next_result()); 26 $mysql->close();
|
H A D | 065.phpt | 19 if (!$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) 22 if (!mysqli_query($mysql, "SET sql_mode=''")) 23 printf("[002] Cannot set SQL-Mode, [%d] %s\n", mysqli_errno($mysql), mysqli_error($mysql)); 29 if ($mysql->set_charset("latin1")) { 31 if (3 !== ($tmp = strlen($mysql->real_escape_string($esc_str)))) 34 if ('latin1' !== ($tmp = $mysql->character_set_name())) 38 if ($res = $mysql->query("SHOW CHARACTER SET LIKE 'gbk'")) { 40 if ($mysql->set_charset("gbk")) { 43 if (2 !== ($tmp = strlen($mysql->real_escape_string($esc_str)))) 46 if ('gbk' !== ($tmp = $mysql->character_set_name())) [all …]
|
H A D | bug36802.phpt | 14 $mysql = mysqli_init(); 17 if (method_exists($mysql, 'set_charset')) { 18 $x[0] = @$mysql->set_charset('utf8'); 22 $x[1] = @$mysql->query("SELECT 'foo' FROM DUAL"); 25 $x[2] = ($mysql->client_version > 0); 26 $x[3] = $mysql->errno; 27 $mysql->close();
|
H A D | 071.phpt | 13 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 14 $version = $mysql->server_version; 16 var_dump($mysql->ping()); 18 $ret = $mysql->kill($mysql->thread_id); 37 var_dump($mysql->ping()); 39 $mysql->close(); 41 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 43 var_dump(mysqli_ping($mysql)); 45 $ret = $mysql->kill($mysql->thread_id); 64 var_dump(mysqli_ping($mysql)); [all …]
|
H A D | bug28817.phpt | 22 $mysql = new my_mysql(); 24 var_dump($mysql->p_test); 25 @var_dump($mysql->errno); 27 $mysql->connect($host, $user, $passwd, $db, $port, $socket); 28 $mysql->select_db("nonexistingdb"); 30 var_dump($mysql->errno > 0); 32 $mysql->close();
|
H A D | 066.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)); 18 $mysql->query("DROP TABLE IF EXISTS test_warnings"); 20 $mysql->query("CREATE TABLE test_warnings (a int not null) ENGINE=myisam"); 22 $mysql->query("INSERT INTO test_warnings VALUES (1),(2),(NULL)"); 24 if (($warning = $mysql->get_warnings())) { 30 $mysql->close();
|
H A D | bug37090.phpt | 18 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 21 $cs[] = $mysql->set_charset("latin1"); 22 $cs[] = $mysql->character_set_name(); 24 $cs[] = $mysql->set_charset("utf8"); 25 $cs[] = $mysql->character_set_name(); 27 $cs[] = $mysql->set_charset("notdefined"); 28 $cs[] = $mysql->character_set_name();
|
H A D | bug35103.phpt | 17 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 18 $mysql->query("DROP TABLE IF EXISTS test_bint"); 19 $mysql->query("CREATE TABLE test_bint (a bigint(20) default NULL) ENGINE=MYISAM"); 20 …$mysql->query("INSERT INTO test_bint VALUES (9223372036854775807),(-9223372036854775808),(-2147483… 22 $mysql->query("DROP TABLE IF EXISTS test_buint"); 23 $mysql->query("CREATE TABLE test_buint (a bigint(20) unsigned default NULL)"); 24 …$mysql->query("INSERT INTO test_buint VALUES (18446744073709551615),(9223372036854775807),(9223372… 26 $stmt = $mysql->prepare("SELECT a FROM test_bint ORDER BY a"); 39 $stmt = $mysql->prepare("SELECT a FROM test_buint ORDER BY a"); 50 $mysql->multi_query($drop); [all …]
|
H A D | 067.phpt | 22 function open_cursor($mysql, $query) { 23 if (!is_object($stmt = $mysql->prepare($query))) { 25 $query, $mysql->errno, $mysql->error); 33 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 36 (mysqli_get_server_version($mysql) < 50009)) { 44 $mysql->query("DROP TABLE IF EXISTS cursor$i"); 45 $mysql->query("CREATE TABLE cursor$i (a int not null) ENGINE=" . $engine); 46 $mysql->query("INSERT INTO cursor$i VALUES (1),(2),(3),(4),(5),(6)"); 47 $stmt[$i] = open_cursor($mysql, "SELECT a FROM cursor$i"); 64 $mysql->close();
|
H A D | 072.phpt | 12 $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); 14 $mysql->query("DROP TABLE IF EXISTS not_exists"); 16 var_dump($mysql->warning_count); 18 $w = $mysql->get_warnings(); 24 $mysql->close();
|
H A D | bug36745.phpt | 13 $mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); 15 $mysql->query("DROP TABLE IF EXISTS litest"); 16 $mysql->query("CREATE TABLE litest (a VARCHAR(20))"); 18 $mysql->query("LOAD DATA LOCAL INFILE 'filenotfound' INTO TABLE litest"); 19 var_dump($mysql->error); 21 $mysql->close();
|
/PHP-5.6/ext/mysql/ |
H A D | config.w32 | 4 ARG_WITH("mysql", "MySQL support", "no"); 9 if (!ADD_EXTENSION_DEP('mysql', 'mysqlnd', true)) { 11 WARNING("mysql not enabled; mysqlnd is not enabled"); 13 EXTENSION("mysql", "php_mysql.c"); 18 if (CHECK_LIB("libmysql.lib", "mysql", PHP_MYSQL) && 19 CHECK_HEADER_ADD_INCLUDE("mysql.h", "CFLAGS_MYSQL", 20 PHP_MYSQL + "\\include;" + PHP_PHP_BUILD + "\\include\\mysql;" + PHP_MYSQL)) { 21 EXTENSION("mysql", "php_mysql.c"); 25 WARNING("mysql not enabled; libraries and headers not found");
|
H A D | php_mysql.c | 347 PHP_MSHUTDOWN(mysql), 348 PHP_RINIT(mysql), 350 PHP_MINFO(mysql), 353 PHP_GINIT(mysql), 545 if (!mysql) { in mysql_convert_zv_to_mysqlnd() 549 return mysql->conn; in mysql_convert_zv_to_mysqlnd() 869 if (!mysql) { 903 free(mysql); 913 free(mysql); 1007 efree(mysql); [all …]
|
H A D | config.m4 | 18 /var/tmp/mysql.sock \ 19 /var/run/mysql/mysql.sock \ 20 /var/lib/mysql/mysql.sock \ 21 /var/mysql/mysql.sock \ 22 /usr/local/mysql/var/mysql.sock \ 23 /Private/tmp/mysql.sock \ 24 /private/tmp/mysql.sock \ 25 /tmp/mysql.sock \ 48 [ --with-mysql-sock[=SOCKPATH] 65 if test -r $PHP_MYSQL/include/mysql/mysql.h; then [all …]
|
/PHP-5.6/ext/pdo_mysql/tests/ |
H A D | pdo_mysql___construct_ini.phpt | 9 if (getenv('PDO_MYSQL_TEST_DSN') !== "mysql:dbname=phptest;unix_socket=/tmp/mysql.sock") 13 pdo.dsn.mysql="mysql:dbname=phptest;socket=/tmp/mysql.sock" 21 if ('pdo.dsn.mysql' == $name) { 22 printf("pdo.dsn.mysql=%s\n", $dsn); 28 $dsn = ini_get('pdo.dsn.mysql'); 33 printf("pdo.dsn.mysql cannot be accessed through ini_get_all()/ini_get()\n"); 41 $db = new PDO('mysql', $user, $pass); 55 pdo.dsn.mysql cannot be accessed through ini_get_all()/ini_get()
|