Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-24191

A bug occurs when an operation is put in the OVER query. Mysqld will be restart

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 10.3.14
    • N/A
    • None
    • client : mysql connector 5.1.46

      server : kernel 3.10.0-957.10.1.el7.x86_64
      CentOS Linux release 7.6.1810 (Core)

      mariaDb : 10.3.14-MariaDB-log
      Galera 25.3.26(r3857) by Codership

    Description

      Description:

      The actual mysqld-err.log is as follows.

      bash
      Thread pointer: 0x7fbbec183678
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7fbbe5637d30 thread_stack 0x49000
      /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x5604930a4dfe]
      /usr/sbin/mysqld(handle_fatal_signal+0x357)[0x560492b44cc7]
      sigaction.c:0(__restore_rt)[0x7fbcdd0cc5d0]
      /usr/sbin/mysqld(_ZN4Item17save_int_in_fieldEP5Fieldb+0x25)[0x560492b67775]
      /usr/sbin/mysqld(_ZN4Item13save_in_fieldEP5Fieldb+0x36)[0x560492b58f66]
      /usr/sbin/mysqld(_Z19compute_window_funcP3THDR4ListI16Item_window_funcERS1_I14Cursor_managerEP5TABLEP9SORT_INFO+0x37a)[0x560492aa39ea]
      /usr/sbin/mysqld(_ZN18Window_func_runner4execEP3THDP5TABLEP9SORT_INFO+0x99)[0x560492aa3cf9]
      /usr/sbin/mysqld(_ZN17Window_funcs_sort4execEP4JOINb+0x7e)[0x560492aa3e2e]
      /usr/sbin/mysqld(_ZN24Window_funcs_computation4execEP4JOINb+0x2a)[0x560492aa451a]
      /usr/sbin/mysqld(_ZN7AGGR_OP8end_sendEv+0xe7)[0x5604929c3267]
      /usr/sbin/mysqld(_Z24sub_select_postjoin_aggrP4JOINP13st_join_tableb+0x39)[0x5604929c3489]
      /usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x1cc)[0x5604929c4f2c]
      /usr/sbin/mysqld(+0x4b543c)[0x56049287743c]
      /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x239b)[0x560492967edb]
      /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x22b)[0x56049296ecab]
      /usr/sbin/mysqld(+0x5ad639)[0x56049296f639]
      /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x1299)[0x560492970f89]
      /usr/sbin/mysqld(_Z10do_commandP3THD+0x13e)[0x56049297288e]
      /usr/sbin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x1aa)[0x560492a48b6a]
      /usr/sbin/mysqld(handle_one_connection+0x3d)[0x560492a48c8d]
      pthread_create.c:0(start_thread)[0x7fbcdd0c4dd5]
      /lib64/libc.so.6(clone+0x6d)[0x7fbcdb466ead]
      

      The actual query is as follows.

      SELECT REQ_GRP_ID
      FROM TB_REQ_MAIN
      WHERE REQ_GRP_ID ='REQ_GRP_000000440'
          ORDER BY ROW_NUMBER() OVER (ORDER BY CREATE_DTM) + 1;
      

      The problem is ORDER BY ROW_NUMBER() OVER (ORDER BY RM.CREATE_DTM)`+1` part.

      In the actual application, it occurs as follows

      [2020-11-11 17:21:53] [08S01] Communications link failure
      [2020-11-11 17:21:53] The last packet successfully received from the server was 149 milliseconds ago. The last packet sent successfully to the server was 149 milliseconds ago.
      [2020-11-11 17:21:53] java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
      

      How to repeat:

      SELECT REQ_GRP_ID
      FROM TB_REQ_MAIN
      WHERE REQ_GRP_ID ='REQ_GRP_000000440'
          ORDER BY ROW_NUMBER() OVER (ORDER BY CREATE_DTM) + 1;
      

      Suggested fix:
      SELECT REQ_GRP_ID
      FROM TB_REQ_MAIN
      WHERE REQ_GRP_ID ='REQ_GRP_000000440'
      ORDER BY ROW_NUMBER() OVER (ORDER BY CREATE_DTM);

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lee sang eui lee sang eui
              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.