MyBB Community Forums
Thank You Like - Recount very slow - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Support (https://community.mybb.com/forum-72.html)
+---- Thread: Thank You Like - Recount very slow (/thread-239004.html)

Pages: 1 2 3 4


RE: Thank You Like - Recount very slow - lost puppy - 2023-08-22

I have to say Laird, it could just be me  Confused

Solved by Laird ... who is a proper Rock Star  Heart

Superb being and I wish to thank him for all his time and devotion to getting thing PERFECT

Time difference is just so very massive I can't begin to say.

24 hours and wouldn't / couldn't finish!

Under a minute >>>> complete and perfect  Big Grin

Thank you Laird


RE: Thank You Like - Recount very slow - Laird - 2023-08-23

(2023-08-22, 03:00 PM)lost puppy Wrote: Solved by Laird

Thanks for indulging me in the tedious back-and-forth until I realised I could duplicate the issue on my own copy of phpMyAdmin, and debug alone.

For those who're curious, the cause seems to be that in phpMyAdmin, apparently, a bare query on the information_schema database irrevocably (for the set of simultaneously executed queries) changes the selected database to information_schema, causing subsequent ALTER TABLE queries on the intended (otherwise-selected) database to fail. That is to say that even though, say, the mybb database is selected, after running a bare query on information_schema, the value returned by SELECT database(); becomes information_schema, and use mybb; doesn't change it back to the mybb database.

The 1.1.0 version of the script I'd attached generated such a bare query:

SELECT COUNT(*)
INTO   @exist
FROM   information_schema.columns
WHERE  table_schema = database()
       AND
       column_name = 'tyl_tnumtyls'
       AND
       table_name = '{$db->table_prefix}threads';

Wrapping that bare query in a prepared statement seems to solve the problem.

I've again updated the script attached to the post selected as the solution. It is now at version 1.1.1.

(2023-08-22, 03:00 PM)lost puppy Wrote: ... who is a proper Rock Star  Heart

Superb being and I wish to thank him for all his time and devotion to getting thing PERFECT

Time difference is just so very massive I can't begin to say.

24 hours and wouldn't / couldn't finish!

Under a minute >>>> complete and perfect  Big Grin

Thank you Laird

You're very welcome, and thank you for your generous praise.