You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a bit of a bizzare issue... I am trying to run an .sql file query, it apparently executes ok, but nothing happens.
This is the query (it's actually really stripped down from what it was - I stripped out as much as I could to try and narrow down the issue:
--
-- Database: `mcnr_mns`
--
-- --------------------------------------------------------
--
-- Table structure for table `helpful_hints`
--
CREATE TABLE `helpful_hints` (
`ID` int(11) NOT NULL,
`Text` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
This is an exported.sql file from phpMyAdmin.
When I remove the comments, the query executes properly.
The mysql.log file states the query executed successfully but the table is not created. There's no errors it simply doesn't create the table.
Literally, removing the comments at the top makes it work fine. But removing just individual lines (I've methodically tried removing one line at a time to narrow it down) doesn't seem to do it, it appears to be some combination. I'm looking at the -- ----------------------- line suspiciously...
The query, in this exact form, executes perfectly fine in phpMyAdmin. It only seems to be with mysql_query_file.
Any other things I can try in an attempt to narrow this down further? I assume it's just a bug with how comments are parsed by the plugin.
EDIT 3:
Ok so appending spaces onto the blank comment lines (the ones in which the entire line is literally just '--') solves the issue.
Can this please be fixed, as any query that is spat out by phpMyAdmin will be formatted with those types of comments... Simply need to skip over those lines. Relatively easy fix, no?
EDIT 4: https://github.com/pBlueG/SA-MP-MySQL/blob/master/src/natives.cpp#L766
Something needs to be done here regarding this, but I don't have experience enough to know exactly what. I understand the part about appending a space, and that does happen, but appending a space after a comment then immediately having a query after it makes no sense; surely that's just going to have mySQL treat it like the query is a comment??
The text was updated successfully, but these errors were encountered:
I have a bit of a bizzare issue... I am trying to run an .sql file query, it apparently executes ok, but nothing happens.
This is the query (it's actually really stripped down from what it was - I stripped out as much as I could to try and narrow down the issue:
This is an exported.sql file from phpMyAdmin.
When I remove the comments, the query executes properly.
The mysql.log file states the query executed successfully but the table is not created. There's no errors it simply doesn't create the table.
Literally, removing the comments at the top makes it work fine. But removing just individual lines (I've methodically tried removing one line at a time to narrow it down) doesn't seem to do it, it appears to be some combination. I'm looking at the
-- -----------------------
line suspiciously...The query, in this exact form, executes perfectly fine in phpMyAdmin. It only seems to be with
mysql_query_file
.Any other things I can try in an attempt to narrow this down further? I assume it's just a bug with how comments are parsed by the plugin.
EDIT:
@maddinat0r Related to #166? I'm on R41-4
EDIT 2:
EDIT 3:
Ok so appending spaces onto the blank comment lines (the ones in which the entire line is literally just '--') solves the issue.
Can this please be fixed, as any query that is spat out by phpMyAdmin will be formatted with those types of comments... Simply need to skip over those lines. Relatively easy fix, no?
EDIT 4:
https://github.com/pBlueG/SA-MP-MySQL/blob/master/src/natives.cpp#L766
Something needs to be done here regarding this, but I don't have experience enough to know exactly what. I understand the part about appending a space, and that does happen, but appending a space after a comment then immediately having a query after it makes no sense; surely that's just going to have mySQL treat it like the query is a comment??
The text was updated successfully, but these errors were encountered: