Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

MySQL error related to Secret Crush

owen-b
Minted
Posted on Mar 06, '07 at 03:37 pm

I’ve just updated one of my Mints from 1.something to 2.04, and after getting it all working, suddenly I got this error:

MySQL Error (from Secret Crush): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 3. (1064) Query: SELECT ip_long, hostname FROM mint_hostnames WHERE

Any ideas why? It means nothing to me I’m afraid.

Cheers!

Shaun Inman
Mint/Pepper Developer
Posted on Mar 06, '07 at 04:55 pm

Is that the entire error message? If so, it would appear that Crushes is trying to lookup hostnames even though no IPs have been recorded yet. It should go away on it’s own once some fresh data is recorded. I’ll release an update shortly to address this bug. Let me know if the problem doesn’t go away on its own.

owen-b
Minted
Posted on Mar 06, '07 at 06:09 pm

Yes that could be it - Crushes isn’t showing any visitors in the last three hours and neither is Session Tracker, but then don’t they both rely on Crushes to work anyway?

I’ll wait till tomorrow and see if it goes away. Cheers.

Silent7
Minted
Posted on Mar 16, '07 at 10:26 pm

Hey Shaun,

I do have data collected in my secret crush and im getting the same error:

MySQL Error (from Secret Crush): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 3. (1064) Query: SELECT ip_long, hostname FROM mint_hostnames WHERE

I updated to the most recent peppers and mint install too..

Jeff

schmitt
Minted
Posted on Jul 16, '07 at 11:02 am

FYI - I get this message about once a month as well. Uninstalling Secret Crush and re-installing resolves the problem.

I use the cookie option in Secret Crush and index to the Wordpress comment cookie.

The full error message is the following:

MySQL Error (from Secret Crush): Can’t find record in ”. (1032) Query: SELECT ip_long, visitor_name, COUNT(resource_checksum) as pages, session_checksum, dt, browser_family, browser_version FROM mint_visit WHERE session_checksum != 0 AND ip_long != 0 AND ip_long != -1 GROUP BY session_checksum ORDER BY dt DESC LIMIT 0,50

If I recall, the error only shows up if Recent crushes are displayed. I may be mistaken on this point.

Shaun Inman
Mint/Pepper Developer
Posted on Jul 17, '07 at 08:56 am

Once things get settled I’ll take a look at the query that is causing this problem. It looks like the AS column aliasing is referring to UA007 columns that it isn’t actually querying. Do you have (or previously have) the UA007 Pepper installed?

schmitt
Minted
Posted on Jul 17, '07 at 02:21 pm

I do have it installed. If I see the problem again I will disable the pepper. It doesn’t provide any critical functionality to me.

schmitt
Minted
Posted on Aug 02, '07 at 09:54 am

I have the issue right now.

schmitt
Minted
Posted on Aug 30, '07 at 04:11 pm

bump

MySQL Error (from Secret Crush): Can't find record in ''. (1032)
Query: SELECT `ip_long`, `visitor_name`, COUNT (`resource_checksum`) as `pages`, `session_checksum`, `dt` FROM `mint_visit` WHERE `session_checksum` != 0 AND `ip_long` != 0 AND `ip_long` != -1 GROUP BY `session_checksum` ORDER BY `dt` DESC LIMIT 0,50

Problem only shows up if recent crushes are displayed. Repeat and newest unique work fine.

UA007 has been disabled for weeks.

The error seems to come and go.

Shaun Inman
Mint/Pepper Developer
Posted on Aug 31, '07 at 10:54 am

Is this the complete error message?

MySQL Error (from Secret Crush): Can't find record in ''. (1032)

It just stops. “In” what? This is a different error from the one Owen-B and Silent7 were encountering (and was fixed in a subsequent update to Secret Crush).

schmitt
Minted
Posted on Aug 31, '07 at 01:24 pm

Shaun - I have simply cut and pasted the message at the top of the screen. It is consistent with the error I had before. Perhaps the cut and paste is trimming something out? When I see it again I will cut from HTML source.

The issue is gone as of this morning. I made no changes to the configuration so it is definitely an intermittent problem.

I use ver 2.09 of SC and 2.11 of Mint. I also use the tracking cookie function.

Shaun Inman
Mint/Pepper Developer
Posted on Aug 31, '07 at 05:01 pm

Usually “Can’t find record in” is followed by a table name. There are no empty quotes in the associated query. MySQL leaves a lot to be desired when it comes to error reporting.

schmitt
Minted
Posted on Sep 02, '07 at 08:39 pm

Maybe it is calling a null tablename? If you specified ” as the table would you see such an error or would MySQL flag it as an invalid command?

Shaun Inman
Mint/Pepper Developer
Posted on Sep 04, '07 at 10:03 am

That’s what I don’t get. The query that resulted in the error is included as part of the error message and a valid table name (mint_visit) is specified.

schmitt
Minted
Posted on Sep 06, '07 at 11:14 am

It’s back.

Same error with empty quotes.

Feel free to email me at schmitt at nyquistcapital.com

Not a big deal to me as it comes and goes.

I am hosted on Mediatemple’s Grid.

Shaun Inman
Mint/Pepper Developer
Posted on Sep 06, '07 at 11:52 am

Unfortunately, without a more informative MySQL error message, there’s nothing to be done. I’ll let you know if I think of anything.

schmitt
Minted
Posted on Sep 20, '07 at 04:19 pm

Update:

I still get these errors and they persist for an hour or so and go away.

I just noticed that when the issue goes away, the secret crush recent visitors log is missing a window of visitors. I believe the hole in records corresponds to the period of the the issue was happening.

Overall hourly visit counts are accurate, only recent secret crush visitors are missing.

Shaun Inman
Mint/Pepper Developer
Posted on Sep 21, '07 at 10:42 am

Does (mt)’s Grid Server maintain any sort of MySQL logs that might reveal what’s going on during that hour?

schmitt
Minted
Posted on Sep 28, '07 at 02:00 pm

I’ll look into it next time it happens.

schmitt
Minted
Posted on Oct 04, '07 at 10:42 am

I am having the issue again, it has persisted for nearly 24 hours. It only appears when Secret crush is selected to display recent visitors. Searching and newest unique work fine.

I ran a detailed MySQL log at MediaTemple. I also ran the debugger pepper for a while.

It would appear I am the only one with the issue which leads me to believe there is something corrupted with my install or the mint visits table.

schmitt
Minted
Posted on Oct 05, '07 at 03:15 pm

Uninstall and reinstall of secret crush appears to fix this every time… until it takes place again.

Shaun I know this one baffles you but I’m just using this thread to keep notes.

schmitt
Minted
Posted on Nov 21, '07 at 07:50 am

Rather than uninstalling Secret Crush I flushed my entire visits table and started over. The error arrived again.

I uninstalled Secret Crush, and re-installed. At the time my server was under higher load with about 20k hits/day, 8x normal. The problem showed up much faster. The problem appears when the mint_visit gets big.

I had database size set to 12 weeks/7Mb. I reduced it to 5Mb and the problem went away immediately, only to return a few minutes later.

The problem is related to database size and hitting the defined limit.

MySQL Error (from Secret Crush): Can’t find record in ”. (1032) Query: SELECT ip_long, visitor_name, resource, resource_title, dt FROM mint_visit WHERE ip_long != 0 AND ip_long != -1 AND session_checksum != 0 GROUP BY ip_long ORDER BY dt DESC LIMIT 0,40

schmitt
Minted
Posted on Dec 04, '07 at 02:40 pm

Well, I’ve triangulated the error. It is definitely related to the database size hitting the defined limit.

Once the database hits the limit set (mine is 7Mb) in the &advanced preferences screen, the error appears. It periodically comes and goes as Mint must decide to trim the database as it exceed the limit. I was ‘fixing’ the error before by uninstalling and re-installing Secret Crush.

If I set the limit to something smaller, the problem continues and exhibits the same behavior. If I increase the limit, after 15 min or so the problem goes away, only to re-appear once again when the database limit is reached.

I can re-produce this at will. If I just set my database size to a smaller number than the current database the error shows up fairly soon.

Long ago I migrated from Bluehost to Mediatemple and I was one of the early folks who ran on x64 bit machines had issues regarding signed and unsigned variables. The exact problem escapes me now.

Is there anyway I could manually check the SQL tables for proper settings? Perhaps the initial setup and subsequent migration flipped a bit somewhere?

You must be logged in to reply. Login above or create an account