[MDEV-28131] Unexpected warning while selecting from information_schema.processlist Created: 2022-03-20  Updated: 2022-04-05  Resolved: 2022-03-22

Status: Closed
Project: MariaDB Server
Component/s: Data types, Information Schema
Affects Version/s: 10.3.32, 10.4.25, 10.5, 10.6, 10.7, 10.8, 10.9
Fix Version/s: 10.9.0, 10.3.35, 10.4.25, 10.5.16, 10.6.8, 10.7.4, 10.8.3

Type: Bug Priority: Major
Reporter: Valerii Kravchuk Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-27673 Warning after "select progress from i... Closed

 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.



 Comments   
Comment by Alexander Barkov [ 2022-03-21 ]

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;

Comment by Alexander Barkov [ 2022-03-21 ]

holyfoot, can you please review a patch:
https://github.com/MariaDB/server/tree/bb-10.3-bar-MDEV-28131

Thanks!

Comment by Alexey Botchkov [ 2022-03-21 ]

ok to push.

Generated at Thu Feb 08 09:58:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.