Re: mysql.general_log custom colums
Posted by: enrico tenivella
Date: November 04, 2015 02:59AM

Good morning Rick,

ignore the "event_unix" field, look this example with an AUTO_INCREMENT column

`id` bigint(20) NOT NULL AUTO_INCREMENT,


mysql> show create table mysql.general_log;
| general_log | CREATE TABLE `general_log` (
`event_time` timestamp NOT NULL,
`user_host` mediumtext NOT NULL,
`thread_id` int(11) NOT NULL,
`server_id` int(10) unsigned NOT NULL,
`command_type` varchar(64) NOT NULL,
`argument` mediumtext NOT NULL,
`id` bigint(20) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=609 COMMENT='General log' |




mysql> select * from mysql.general_log limit 1,1\G
*************************** 1. row ***************************
event_time: 2015-11-04 09:40:04
user_host: xxxxxxxxxx[xxxxxxxxxxxxxxx] @ xxx.xxx.xx [192.168.7.11]
thread_id: 428596
server_id: 8
command_type: Query
argument: INSERT DELAYED INTO xxxxxx [data data data] NULL, NULL )
id: 2
1 row in set (0.00 sec)



column autoincrement "id" works fine, mysql does not show any error about wrong columns number.

ty

Options: ReplyQuote


Subject
Written By
Posted
Re: mysql.general_log custom colums
November 04, 2015 02:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.