0

I'm performing an alter. It's currently running on a large table (300,000,000).

MariaDB [my_database]> ALTER TABLE my_table
    -> add INDEX a (x, y, z),
    -> add INDEX d (x);
Stage: 1 of 2 'copy to tmp table'   60.1% of stage done

But the processlist doesn't mention it, with repeated queries.

MariaDB [my_database]> show full processlist;
+----+------+-----------------+-------------+---------+------+-------+-----------------------+----------+
| Id | User | Host            | db          | Command | Time | State | Info                  | Progress |
+----+------+-----------------+-------------+---------+------+-------+-----------------------+----------+
|  6 | apps | localhost:52235 | my_database | Sleep   |  304 |       | NULL                  |    0.000 |
| 33 | apps | localhost       | my_database | Query   |    0 | NULL  | show full processlist |    0.000 |
+----+------+-----------------+-------------+---------+------+-------+-----------------------+----------+
2 rows in set (0.01 sec)

I would expect it to show up. Any ideas why not?

  • Why do you ask? – Joe Dec 21 '15 at 9:00
1

It sounds like the user that's executing the ALTER TABLE and the user who's running SHOW PROCESSLIST are not the same user, and the second user lacks the PROCESS privilege.

If you have the PROCESS privilege, you can see all threads. Otherwise, you can see only your own threads (that is, threads associated with the MySQL account that you are using).

http://dev.mysql.com/doc/refman/5.6/en/show-processlist.html

| improve this answer | |
  • You're right, thanks. I had too many shells open and wasn't trying this with the correct user. – Joe Jan 25 '15 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.