Lines Matching refs:MySG
418 MySG(result_allocated)--; in _free_mysql_result()
426 if (MySG(default_link) != -1) { in php_mysql_set_default_link()
427 zend_list_delete(MySG(default_link)); in php_mysql_set_default_link()
429 MySG(default_link) = id; in php_mysql_set_default_link()
459 MySG(num_links)--; in _close_mysql_link()
475 MySG(num_persistent)--; in _close_mysql_plink()
476 MySG(num_links)--; in _close_mysql_plink()
485 MySG(default_port) = atoi(new_value); in PHP_INI_MH()
487 MySG(default_port) = -1; in PHP_INI_MH()
629 MySG(default_link)=-1; in PHP_RINIT_FUNCTION()
630 MySG(num_links) = MySG(num_persistent); in PHP_RINIT_FUNCTION()
632 MySG(connect_error) = NULL; in PHP_RINIT_FUNCTION()
633 MySG(connect_errno) =0; in PHP_RINIT_FUNCTION()
634 MySG(result_allocated) = 0; in PHP_RINIT_FUNCTION()
660 if (MySG(trace_mode)) { in PHP_RSHUTDOWN_FUNCTION()
661 if (MySG(result_allocated)){ in PHP_RSHUTDOWN_FUNCTION()
662 …free_result to free result sets which were requested using mysql_query()", MySG(result_allocated)); in PHP_RSHUTDOWN_FUNCTION()
666 if (MySG(connect_error)!=NULL) { in PHP_RSHUTDOWN_FUNCTION()
667 efree(MySG(connect_error)); in PHP_RSHUTDOWN_FUNCTION()
686 snprintf(buf, sizeof(buf), "%ld", MySG(num_persistent)); in PHP_MINFO_FUNCTION()
688 snprintf(buf, sizeof(buf), "%ld", MySG(num_links)); in PHP_MINFO_FUNCTION()
746 connect_timeout = MySG(connect_timeout);
748 socket = MySG(default_socket);
750 if (MySG(default_port) < 0) {
755 MySG(default_port) = MYSQL_PORT;
757 MySG(default_port) = (uint) ntohs((ushort) serv_ptr->s_port);
760 MySG(default_port) = (uint) atoi(env);
763 MySG(default_port) = MYSQL_PORT;
792 host_and_port = MySG(default_host);
795 user = MySG(default_user);
798 passwd = MySG(default_password);
840 port = MySG(default_port);
847 if (!MySG(allow_persistent)) {
857 if (MySG(max_links) != -1 && MySG(num_links) >= MySG(max_links)) {
858 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MySG(num_links));
862 if (MySG(max_persistent) != -1 && MySG(num_persistent) >= MySG(max_persistent)) {
863 …php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open persistent links (%ld)", MySG(num_persi…
895 if (MySG(connect_error) != NULL) {
896 efree(MySG(connect_error));
898 MySG(connect_error) = estrdup(mysql_error(mysql->conn));
899 php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", MySG(connect_error));
901 MySG(connect_errno) = mysql_errno(mysql->conn);
907 mysql_options(mysql->conn, MYSQL_OPT_LOCAL_INFILE, (char *)&MySG(allow_local_infile));
917 MySG(num_persistent)++;
918 MySG(num_links)++;
947 mysql_options(mysql->conn, MYSQL_OPT_LOCAL_INFILE, (char *)&MySG(allow_local_infile));
986 if (MySG(max_links) != -1 && MySG(num_links) >= MySG(max_links)) {
987 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MySG(num_links));
1004 MySG(connect_error) = estrdup("OOM");
1022 if (MySG(connect_error) != NULL) {
1023 efree(MySG(connect_error));
1025 MySG(connect_error) = estrdup(mysql_error(mysql->conn));
1026 php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", MySG(connect_error));
1028 MySG(connect_errno) = mysql_errno(mysql->conn);
1038 mysql_options(mysql->conn, MYSQL_OPT_LOCAL_INFILE, (char *)&MySG(allow_local_infile));
1050 MySG(num_links)++;
1063 if (MySG(default_link)==-1) { /* no link opened yet, implicitly open one */
1067 return MySG(default_link);
1102 …ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, NULL, MySG(default_link), "MySQL-Link", le_link, le_…
1105 resource_id = mysql_link ? Z_RESVAL_P(mysql_link) : MySG(default_link);
1118 || (mysql_link && Z_RESVAL_P(mysql_link)==MySG(default_link))) {
1119 MySG(default_link) = -1;
1466 if (MySG(trace_mode)) {
1497 if (MySG(trace_mode)){
1507 if (MySG(trace_mode)){
1528 MySG(result_allocated)++;
1629 MySG(result_allocated)++;
1667 MySG(result_allocated)++;
1705 MySG(result_allocated)++;
1738 MySG(result_allocated)++;
1757 id = MySG(default_link);
1759 if (MySG(connect_error)!=NULL){
1760 RETURN_STRING(MySG(connect_error),1);
1788 id = MySG(default_link);
1790 if (MySG(connect_errno)!=0){
1791 RETURN_LONG(MySG(connect_errno));