Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-41

[PHP]Reuse the connection established

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: PHP Driver
    • Labels:
      None
    • Environment:

      CUBRID 8.4.1

      Description

      PHP driver will establish a new connect when you use cubrid_connect or cubrid_connect_with_url. But when we use the same parameters in the same request, we should use the connect already exist. PHP driver will establish a new connect in this situation. Establishing a connect is consumption of resources, so we add connecting pool to handle connections, that is, when you establish a connection use the same parameters that you have used before in the same request, it won't establish a new connect, but use the connect already existing in the connecting pool.

        Activity

        Hide
        kadishmal Esen Sagynov added a comment - - edited

        If we plan to provide connection pooling, can we also provide Persistent Connection (APIS-23)?

        Show
        kadishmal Esen Sagynov added a comment - - edited If we plan to provide connection pooling, can we also provide Persistent Connection ( APIS-23 )?
        Hide
        hellohuizhang 张慧 added a comment -

        Yes, I'll add the issue about persistent connection later. We will add these features in CUBRID 8.4.1

        Show
        hellohuizhang 张慧 added a comment - Yes, I'll add the issue about persistent connection later. We will add these features in CUBRID 8.4.1
        Hide
        xiaoshan78 李成龙[이성룡] added a comment -

        There is confusion in Persistent connection and Connection pooling. No plan to implement connection pooling features in the foreseeable future.

        Show
        xiaoshan78 李成龙[이성룡] added a comment - There is confusion in Persistent connection and Connection pooling. No plan to implement connection pooling features in the foreseeable future.
        Hide
        hellohuizhang 张慧 added a comment -

        For mysql, if a second call is made to mysql_connect() with the same arguments, no new link will be established, but instead, the connect identifier of the already opened connection will be returned. The new_link parameter modifies this behavior and makes mysql_connect() always open a new connection, even if mysql_connect() was called before with the same parameters.

        To make compatibility with mysql, we add the new_link parameter in cubrid_connect and cubrid_connect_with_url.

        Show
        hellohuizhang 张慧 added a comment - For mysql, if a second call is made to mysql_connect() with the same arguments, no new link will be established, but instead, the connect identifier of the already opened connection will be returned. The new_link parameter modifies this behavior and makes mysql_connect() always open a new connection, even if mysql_connect() was called before with the same parameters. To make compatibility with mysql, we add the new_link parameter in cubrid_connect and cubrid_connect_with_url.
        Hide
        hellohuizhang 张慧 added a comment -

        commit rev: 303

        Show
        hellohuizhang 张慧 added a comment - commit rev: 303
        Hide
        hellohuizhang 张慧 added a comment -

        We have fixed this issue in PHP-8.4.1

        Show
        hellohuizhang 张慧 added a comment - We have fixed this issue in PHP-8.4.1

          People

          • Assignee:
            hellohuizhang 张慧
            Reporter:
            hellohuizhang 张慧
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: