[MDEV-28389] Data too long for column 'line' Created: 2022-04-22  Updated: 2023-04-04  Resolved: 2022-06-27

Status: Closed
Project: MariaDB Server
Component/s: Platform FreeBSD, Storage Engine - InnoDB, Tests
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9
Fix Version/s: 10.3.36, 10.4.26, 10.5.17, 10.6.9, 10.7.5, 10.8.4, 10.9.2, 10.10.1

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-19766 innodb.leaf_page_corrupted_during_rec... Closed
relates to MDEV-25909 Unnecessary calls to fil_ibd_load() s... Open

 Description   

In non-debug builds, the test innodb.corrupted_during_recovery often causes InnoDB to output a page dump. This will upset the test driver (as noted in MDEV-25909):

10.6 d4a89b92629328f7e18b7e0595f88f24

innodb.corrupted_during_recovery 'innodb' w1 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2021-10-27 10:14:27
Warnings:
Warning	1406	Data too long for column 'line' at row 8
line
 len 16384; hex 0000000000000003ffffffffffffffff…2021-10-27
^ Found warnings in /dev/shm/var/1/log/mysqld.1.err
ok

The following patch allows the problem to be reproduced in a more controlled fashion:

diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index 3aa1aecb54f..31b50a65967 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -1838,6 +1838,11 @@ dberr_t srv_start(bool create_new_db)
 	}
 
 	srv_is_being_started = false;
+	fputs("[Warning] ", stderr);
+	char buf[65537];
+	memset(buf, '0', (sizeof buf)-1);
+	buf[(sizeof buf)-1]='\n';
+	fwrite(buf, sizeof buf, 1, stderr);
 
 	if (srv_print_verbose_log) {
 		ib::info() << INNODB_VERSION_STR

10.7 9e314fcf6e666ce6fdbdd8ca1ae23d6c4b389b21

innodb.innodb 'innodb'                   [ fail ]
        Test ended at 2022-04-22 09:35:24
 
CURRENT_TEST: innodb.innodb
 
 
Could not execute 'check-warnings' for testcase 'innodb.innodb' (res: 1) server: 'mysqld.1:
mysqltest: At line 44: query 'load data infile '$log_warning' into table error_log
fields terminated by 'xykls37' escaped by ''
  ignore 1 lines
(line)
set file_name='$log_error'' failed with wrong errno ER_DATA_TOO_LONG (1406): 'Data too long for column 'line' at row 1', instead of  (0)...
not ok
mysqltest failed but provided no output
The result from queries just before the failure was:
< snip >

The InnoDB page dumps output can be about 3×innodb_page_size characters, plus a couple dozen characters of prefix.



 Comments   
Comment by Marko Mäkelä [ 2022-06-27 ]

It appears simpler to rewrite the InnoDB function buf_page_print() so that it will only produce 64 hexadecimal digits per line. That will limit the maximum length of the output.

There was a previous work-around of MDEV-19766 that disabled the page dump output in debug builds. We might want to retain that, because the page dump output should only be useful when we do not have access to the data files. In our internal testing (mostly on debug builds), the page dump output adds very little value.

Generated at Thu Feb 08 10:00:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.