Bug #41925 Warning 1366 Incorrect string value: ... for column processlist.info
Submitted: 7 Jan 16:43 Modified: 8 Jan 19:50
Reporter: Matthias Leich
Status: Verified
Category:Server: SP Severity:S3 (Non-critical)
Version:5.1,6.0 OS:Any
Assigned to: Target Version:
Tags: random
Triage: Triaged: D4 (Minor)

[7 Jan 16:43] Matthias Leich
Description:
IMHO any simple SELECT on information_schema.processlist
must not throw a warning. But I get sometimes

SELECT * INTO OUTFILE "<outfile>"
FIELDS TERMINATED BY '<-->' OPTIONALLY ENCLOSED BY '"'
FROM information_schema.processlist;
Warnings:
Warning 1366    Incorrect string value: '\x8F\x8F\x8F\x8F\x8F\x8F...' for column 'INFO'
at row 1

Whenever my test suffered from this problem the printed piece
of the incorrect string value was '\x8F\x8F\x8F\x8F\x8F\x8F...'.

The content of the outfile is:
------------------------------
13<-->"root"<-->"localhost"<-->"events_test"<-->"Connect"<-->0<-->"logging slow
query"<-->""
12<-->"event_scheduler"<-->"localhost"<-->\N<-->"Daemon"<-->0<-->"Waiting for next
activation"<-->\N
2<-->"root"<-->"localhost"<-->"events_test"<-->"Query"<-->0<-->"executing"<-->"SELECT *,
hex(info) INTO OUTFILE
\"/work2/5.1/mysql-5.1-bugteam-work1/mysql-test/var/tmp/outfile-test.4\"\
FIELDS TERMINATED BY '<-->' OPTIONALLY ENCLOSED BY '\"'\
FROM information_schema.processlist"

The session with ID = 13 is just around the end of the
execution of an event.
Other example:
16<-->"root"<-->"localhost"<-->"events_test"<-->"Connect"<-->0<-->\N<-->""
<entries of some not important sessions deleted>

Bug#28582 event_scheduler uses uninitialized variable
          in show processlist 'info' output
seems to be the same problem and is set to "Can't repeat".
Therefore I assume that the current bug is within the implementation
of the "processlist" (SHOW PROCESSLIST) but not within the
implementation of the information_schema table.

The reason why I decided to create a new bug and not to
reopen the old one is because
- the last comment in Bug#28582 says
  "I confirm this is not repeatable ...." which most probably
  means the program for bug reproduction in Bug#28582 is no more
  able to reveal the problem within the scenarios it checks
- my replay program is able to reveal open problems

How to repeat:
I will add scripts for the reproduction of the
problem soon.
[8 Jan 18:26] Matthias Leich
Archive with replay testcase

Attachment: bug41925.tgz (application/x-compressed-tar, text), 2.36 KiB.

[8 Jan 18:44] Matthias Leich
How to replay the problem:
cd mysql-test
tar xvzf bug41925.tgz
rm var
   Just to be sure that var does not point to a tmpfs.
   Running on a disk based filesystem increases the probability
   for replaying the problem.
./mysql-test-run.pl `perl -e 'for (1 .. 300) { print "bug41925 "}'`
[8 Jan 19:50] Matthias Leich
My environment:
- MySQL compiled from source
  6.0-bugteam last changeset 2009-01-08
  5.1-bugteam last changeset 2008-12-31
  (BUILD/compile-pentium64-debug-max)
- Intel Core2Duo (64 Bit)
- OpenSuSE Linux 11 (64 Bit)