Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-696

Replace COM_PROCESS_KILL by SQL statement in mysql_kill() API function

Details

    Description

      For MySQL compatibility the sql KILL command should be used instead of sending COM_PROCESS_KILL. COM_PROCESS_KILL was removed in MySQL 8.4

      Also mysql_kill function cannot handle process id's larger than 32-bit.

      Attachments

        Activity

          There are no process ids larger than 32bit.

          wlad Vladislav Vaintroub added a comment - There are no process ids larger than 32bit.
          georg Georg Richter added a comment -

          wlad information_schema.processlist.ID is defined as BIGINT(4). CONNECTION_ID() is either LONG or LONGLONG.

          georg Georg Richter added a comment - wlad information_schema.processlist.ID is defined as BIGINT(4). CONNECTION_ID() is either LONG or LONGLONG.

          I do not know why connection_id() is so fancy. But I do know it is limited to 32bit range, because our protocol does not like 4 bytes, there is https://jira.mariadb.org/browse/MDEV-15089 about it, and there is a mtr test that ensures no overflow.

          wlad Vladislav Vaintroub added a comment - I do not know why connection_id() is so fancy. But I do know it is limited to 32bit range, because our protocol does not like 4 bytes, there is https://jira.mariadb.org/browse/MDEV-15089 about it, and there is a mtr test that ensures no overflow.
          georg Georg Richter added a comment -

          @Wlad You're right - just checked next_thread_id() function in mysqld.cc - it's limited to thread_id_max -1.
          However documentation is a little bit misleading:
          Until MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or bigint(10), in all cases. From MariaDB 10.3.1, returns MYSQL_TYPE_LONG, or int(10), when the result would fit within 32-bits.

          georg Georg Richter added a comment - @Wlad You're right - just checked next_thread_id() function in mysqld.cc - it's limited to thread_id_max -1. However documentation is a little bit misleading: Until MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or bigint(10), in all cases. From MariaDB 10.3.1, returns MYSQL_TYPE_LONG, or int(10), when the result would fit within 32-bits.

          The documentation remark is standard wording for breaking change in 10.3, for 50 functions documented in https://jira.mariadb.org/browse/MDEV-16360. It is not wrong, but yes it is misleading. I fixed it.

          wlad Vladislav Vaintroub added a comment - The documentation remark is standard wording for breaking change in 10.3, for 50 functions documented in https://jira.mariadb.org/browse/MDEV-16360 . It is not wrong, but yes it is misleading. I fixed it.

          People

            georg Georg Richter
            georg Georg Richter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.