[MDEV-4412] SLOW QUERY LOG - add affected rows (UPDATE / DELETE) in slow query log Created: 2013-04-22  Updated: 2014-12-01  Resolved: 2014-12-01

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Fix Version/s: 10.1.2

Type: Task Priority: Major
Reporter: roberto spadim Assignee: Nirbhay Choubey (Inactive)
Resolution: Fixed Votes: 1
Labels: None


 Description   

hi guys i was running a update and it was logged in slow query

# Time: 130422 10:34:20
# User@Host: rspadim[rspadim] @  [179.233.54.101]
# Thread_id: 10019  Schema: 19_org  QC_hit: No
# Query_time: 17.094863  Lock_time: 0.000066  Rows_sent: 0  Rows_examined: 1301065
SET timestamp=1366637660;
UPDATE `nf_itens` SET `valor_produto_grandeza`='pl' WHERE  `id_item`=1;

the point is... how many rows it changed? could it be logged in slow query log? since my write speed is slow, since it's a raid1 (faster read than write)

tnkx!



 Comments   
Comment by Nirbhay Choubey (Inactive) [ 2014-11-29 ]

http://lists.askmonty.org/pipermail/commits/2014-November/007091.html

Comment by Nirbhay Choubey (Inactive) [ 2014-11-30 ]

http://lists.askmonty.org/pipermail/commits/2014-November/007094.html

Comment by Sergei Golubchik [ 2014-11-30 ]

not ok yet, see the review in email

Comment by Nirbhay Choubey (Inactive) [ 2014-11-30 ]

http://lists.askmonty.org/pipermail/commits/2014-November/007098.html

Comment by Nirbhay Choubey (Inactive) [ 2014-11-30 ]

--- a/scripts/mysql_system_tables_fix.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -251,6 +251,8 @@ SET GLOBAL slow_query_log = 'OFF';
 ALTER TABLE slow_log
   ADD COLUMN thread_id BIGINT(21) UNSIGNED NOT NULL AFTER sql_text;
 ALTER TABLE slow_log
+  ADD COLUMN rows_affected INTEGER NOT NULL AFTER thread_id;
+ALTER TABLE slow_log
   MODIFY start_time TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   MODIFY user_host MEDIUMTEXT NOT NULL,
   MODIFY query_time TIME(6) NOT NULL,

Comment by Sergei Golubchik [ 2014-11-30 ]

if that's the only change from the previous patch — ok to push

Comment by roberto spadim [ 2014-12-01 ]

nice news i will test in some weeks

Generated at Thu Feb 08 06:56:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.