Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add query to debug logs in the most places where (assumed) that peopl… #105

Merged
merged 2 commits into from
Aug 25, 2016
Merged

Add query to debug logs in the most places where (assumed) that peopl… #105

merged 2 commits into from
Aug 25, 2016

Conversation

karimcambridge
Copy link

…e get most errors

This way we don't have to turn on LOG_DEBUG if we have massive constant
MySQL usage!

…e get most errors

This way we don't have to turn on LOG_DEBUG if we have massive constant
MySQL usage!
@maddinat0r
Copy link
Collaborator

Thanks for the pull request!

Make sure there are no places left out where printing the query will help in finding an error (probably also in GetFieldName, GetRowDataByName, mysql_pquery, ...), because this will be the last pull request I'll ever merge into R39. R39-6 will be the last release in the R39 patch-release-series.

You're also printing an unchecked char pointer in line 901, which will probably lead to a crash when executing mysql_tquery(sql, ""). Change it to something like , query_str ? query_str : ""); and make sure that something like that doesn't get added by mistake again (eg. when you add more query-prints).

@maddinat0r
Copy link
Collaborator

@karimcambridge Are you still interested in that PR? I'm delaying the R39-6 release because of this PR.

@karimcambridge
Copy link
Author

Lol yea yea sorry, too busy enjoying the summer. Will do it tmr hopefully.

@karimcambridge
Copy link
Author

What do you think about that?

@maddinat0r
Copy link
Collaborator

Could you also print the query in mysql_query? Other than that, everything else seems fine.

@karimcambridge
Copy link
Author

I can't find an obvious way of doing it in mysql_query.

mysql_query has no 'ERROR' level of debugging.

It only has this

if(!CMySQLHandle::IsValid(connection_id))
        return ERROR_INVALID_CONNECTION_HANDLE("mysql_query", connection_id);

@maddinat0r
Copy link
Collaborator

Ah yes, you've already added the query-print in CMySQLQuery::Execute, so it would be redundant to print the query again in mysql_query.
I'll merge this, thanks again!

@maddinat0r maddinat0r merged commit b89d115 into pBlueG:issue-54 Aug 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants