Jump to the post that solved this thread.
Solved: 1 Year, 5 Months, 1 Week ago Thank You Like - Recount very slow
#29
Solved: 1 Year, 5 Months, 1 Week ago
(2023-08-22, 02:28 PM)Laird Wrote: So, it was the PREPARE query generating the error all along. But why?

What does this show if you run it just before the PREPARE query?

SELECT @query;

I get the same "Access Denied" error.

So the full 5th query is:

SELECT COUNT(*)
INTO   @exist
FROM   information_schema.columns 
WHERE  table_schema = database()
       AND
       column_name = 'tyl_tnumtyls'
       AND
       table_name = 'REDACTED_threads';
SET @query = IF(@exist <= 0,
                "
                 ALTER TABLE REDACTED_threads
                 ADD         tyl_tnumtyls int(100) NOT NULL default '0'
                ",
                "SET @dummy1 = 1"
               );
SELECT @query;
PREPARE stmt FROM @query;
EXECUTE stmt;

and the first 2 parts run no problem .... just the last 3 lines create the "Access Denied"

Could it be something to do with the server security I have set?

Fact is Laird ... your code did the job and did it VERY quickly even on 3.5 million likes  Big Grin

Maybe I just should do the TYL update and then run the first set of queries you created?
Or I am happy to continue trying whatever you wish to sort it out?

Either way mate .... You Are A STAR  Heart
Reply
Jump to the post that solved this thread.


Messages In This Thread
RE: Thank You Like - Recount very slow - by Laird - 2023-08-19, 11:40 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-21, 08:04 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 01:32 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 09:14 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 10:27 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 11:11 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 11:28 AM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 12:13 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 12:30 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 12:42 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 12:58 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 01:08 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 01:51 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 02:28 PM
RE: Thank You Like - Recount very slow - by lost puppy - 2023-08-22, 02:41 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-22, 02:52 PM
RE: Thank You Like - Recount very slow - by Laird - 2023-08-23, 01:02 AM

Forum Jump:


Users browsing this thread: 19 Guest(s)