CHECK TABLE output is reported too late in mysql error log
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PBXT |
Fix Committed
|
Undecided
|
Vladimir Kolesnikov |
Bug Description
I have found the output of CHECK TABLE. It is written to the error
log. But only when I shut-down the database.
Version: 1.0.11-7 Pre-GA/MariaDB 5.2.4
Possible reason: PBXT reports these information with a printf command which reports to stdout/stderr. This is sent from mysqld to mysqld_safe which seems to cache somehow the output and just writes it at shutdown to the error log. But this is just a wild guess and I did not try this out.
In other parts of the code such information are written with the following function calls to the error log:
MySQL: sql_print_
InnoDB/XtraDB: fprintf(stderr,
PBXT: xt_logf(
What is the right way doing it I do not know. But I think it should be not too difficult to fix it. Maybe I can write a patch for this...
Anyway I think this the wrong way doing it. See also my "dreams" in the next part.
110208 21:27:30 [Note] Event Scheduler: Purging the queue. 0 events
110208 21:27:31 InnoDB: Starting shutdown...
110208 21:27:32 InnoDB: Shutdown completed; log sequence number 35865713
CHECK TABLE: ./foodmart/
Record buffer size = 40
Fixed length rec. len. = 35
Handle data record size = 49
Min/max header size = 14/14
Min/avg/max record size = 42/42/42
Avg row len set for tab = not specified
Rows fixed length = YES
Maximum fixed size = 16384
Minimum variable size = 320
Minimum auto-increment = 0
Number of columns = 8
Number of fixed columns = 0
Columns req. for index = 5
Rec len req. for index = 21
Columns req. for blobs = 0
Number of blob columns = 0
Number of indices = 5
Minumum comp. rec. len. = 42
Average comp. rec. len. = 42
Maximum comp. rec. len. = 42
Free record count = 0
Deleted record count = 0
Allocated record count = 269720
110208 21:27:32 [Note] PrimeBase XT Engine shutdown...
110208 21:27:32 [Note] ./bin/mysqld: Shutdown complete
Related branches
Changed in pbxt: | |
status: | New → Fix Committed |
assignee: | nobody → Vladimir Kolesnikov (vkolesnikov) |
Related to this bug I was dreaming: We live in a relational world. So everything should be a table...
Instead of writing those information to the error log (which does not even happen because of the bug) I would like to have written them in a table.
CHECK TABLE imho is anway the wrong command. I would prefer the ANALZYE TABLE command instead (but this is a detail).
So what I would like to have is:
ANALYZE TABLE foodmart.product;
and then:
SELECT * from pbxt.table_ statistics; ------- --+---- ------- ---+--- ------- --+---- ------- ------- --+---- ------- ------- ------- ---+--- ------- ------- ------- -+----- ------- -----+- ------- ------- --+---- ------- ------+ ------- ------- ---+--- ------- ------- +------ ------- ---+--- ------- ------- --+---- ------- -----+- ------- ------- ----+-- ------- ------- ----+-- ------- ------- ---+--- ------- ------- ------- -+----- ------- ------- ------- --+---- ------- ------- ------- ------- --+---- ------- ------- ------- ---+--- ------- ------- ------- +------ ------- ------+ ------- ------- ------- -+----- ------- ------- ----+-- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ------- ------- ---+--- ------- ------- -----+- ------- ------- ------- --+ record_ length | Handle_ data_record_ size | Min_header_size | Max_header_size | Min_record_size | Avg_record_size | Max_record_size | Avg_row_length | Rows_fixed_length | Max_fixed size | Min_variable size | Min_auto_increment | Number_of_columns | Number_ of_fixed_ columns | Columns_ required_ for_index | Record_ length_ required_ for_index | Columns_ required_ for_blobs | Number_ of_blob_ columns | Number_of_indices | Extended_ data_length | Extended_ record_ count | Min_compare_ record_ length | Avg_compare_ record_ length | Max_compare_ record_ length | Free_record_count | Deleted_ record_ count | Allocated_ record_ count | ------- --+---- ------- ---+--- ------- --+---- ------- ------- --+---- ------- ------- ------- ---+--- ------- ------- ------- -+----- ------- -----+- ------- ------- --+---- ------- ------+ ------- ------- ---+--- ------- ------- +------ ------- ---+--- ------- ------- --+---- ------- -----+- ------- ------- ----+-- ------- ------- ----+-- ------- ------- ---+--- ------- ------- ------- -+----- ------- ------- ------- --+---- ------- ------- ------- ------- --+---- ------- ------- ------- ---+--- ------- ------- ------- +------ ------- ------+ ------- ------- ------- -+----- ------- ------- ----+-- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ------- ------- ---+--- ------- ------- -----+- ------- ------- ------- --+
+------
| Table_catalog | Table_schema | Table_name | Record_buffer_size | Fixed_length_
+------
| NULL | foodmart | product | 192 | 191 | 205 | 14 | 14 | 82 | 202 | 202 | NULL | YES | 16384 | 320 | 0 | 15 | 0 | 5 | 140 | 0 | 0 | 5 | NULL | NULL | 93 | 112 | 138 | 0 | ...