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

Unexpected warning while selecting from information_schema.processlist

Details

    Description

      Run this in one session:

      MariaDB [test]> select sleep(100);
      

      and while it runs check the following simple SELECT:

      MariaDB [test]> select id, user, host, progress from information_schema.processlist where info not like '%information%';
      +----+---------+-----------+----------+
      | id | user    | host      | progress |
      +----+---------+-----------+----------+
      |  9 | Valerii | localhost |        0 |
      +----+---------+-----------+----------+
      1 row in set, 1 warning (0.006 sec)
       
      MariaDB [test]> show warnings\G
      *************************** 1. row ***************************
        Level: Warning
         Code: 1918
      Message: Encountered illegal value '' when converting to DECIMAL
      1 row in set (0.000 sec)
       
      MariaDB [test]> select version();
      +-----------------+
      | version()       |
      +-----------------+
      | 10.4.25-MariaDB |
      +-----------------+
      1 row in set (0.002 sec)
       
      MariaDB [test]> select @@sql_mode\G
      *************************** 1. row ***************************
      @@sql_mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
      1 row in set (0.000 sec)
      

      Note the warning that is unexpected and I am not sure how to explain it.

      Attachments

        Issue Links

          Activity

            Repeatable with this MTR test:

            connect (conn1, localhost, root,,);
            connection conn1;
            let $ID= `select connection_id()`;
            send SELECT SLEEP(1000);
            connection default;
            let $wait_timeout= 10;
            let $wait_condition=select count(*)=1 from information_schema.processlist
            where state='User sleep' and info='SELECT SLEEP(1000)';
            --source include/wait_condition.inc
            SELECT progress FROM information_schema.processlist WHERE info='SELECT SLEEP(1000)';
            disable_query_log;
            eval kill $ID;
            enable_query_log;
            let $wait_timeout= 10;
            let $wait_condition=select count(*)=0 from information_schema.processlist
            where state='User sleep' and info='SELECT SLEEP(1000)';
            --source include/wait_condition.inc
            connection conn1;
            --error 2013,ER_CONNECTION_KILLED
            reap;
            connection default;
            disconnect conn1;
            

            The output displays the mentioned warning:

            connect  conn1, localhost, root,,;
            connection conn1;
            SELECT SLEEP(1000);
            connection default;
            SELECT progress FROM information_schema.processlist WHERE info='SELECT SLEEP(1000)';
            progress
            0
            Warnings:
            Warning	1918	Encountered illegal value '' when converting to DECIMAL
            connection conn1;
            Got one of the listed errors
            connection default;
            disconnect conn1;
            

            bar Alexander Barkov added a comment - Repeatable with this MTR test: connect (conn1, localhost, root,,); connection conn1; let $ID= ` select connection_id()`; send SELECT SLEEP(1000); connection default ; let $wait_timeout= 10; let $wait_condition= select count (*)=1 from information_schema.processlist where state= 'User sleep' and info= 'SELECT SLEEP(1000)' ; --source include/wait_condition.inc SELECT progress FROM information_schema.processlist WHERE info= 'SELECT SLEEP(1000)' ; disable_query_log; eval kill $ID; enable_query_log; let $wait_timeout= 10; let $wait_condition= select count (*)=0 from information_schema.processlist where state= 'User sleep' and info= 'SELECT SLEEP(1000)' ; --source include/wait_condition.inc connection conn1; --error 2013,ER_CONNECTION_KILLED reap; connection default ; disconnect conn1; The output displays the mentioned warning: connect conn1, localhost, root,,; connection conn1; SELECT SLEEP(1000); connection default; SELECT progress FROM information_schema.processlist WHERE info='SELECT SLEEP(1000)'; progress 0 Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL connection conn1; Got one of the listed errors connection default; disconnect conn1;
            bar Alexander Barkov added a comment - holyfoot , can you please review a patch: https://github.com/MariaDB/server/tree/bb-10.3-bar-MDEV-28131 Thanks!

            ok to push.

            holyfoot Alexey Botchkov added a comment - ok to push.

            People

              bar Alexander Barkov
              valerii Valerii Kravchuk
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.