Ok, so here I am working with MySQL Connector/NET. I have the latest version of it (1.0.8). Everything worked properly in 1.0.7, so I thought that the updated version should work properly too. Well, no, actually. I don’t know what are the devs thinking, but I am outraged.
The problem is that I download a mysql dump file and after that using MySQL Connector update the local database. You think it is easy, right? Well, that’s what I thought in the first place, but turns out that it just doesn’t work.If you know C# & .NET then you know that dumps should be inserted with ExecuteNonQuery() function. Ok, sounds easy, right? Worng, all the time this crappy driver threw an exception saying “Query was empty”. Wtf? I even created a breakpoint and inserted an MessageBox.Show(command.CommandText). The query was there. I spent hours on searching the internet about this bug (or feature?). I found one bug report saying, that carriage returns were causing this and that it was fixed in 1.0.7. Screw that, this bug IS PRESENT in 1.0.8 AND 5.0.3. How do I know? Well, because I replaced all returns with spaces and it worked out perfectly! Now why the fuck I should wark around bugs, that were already fixed?? Oh, oh, and by the way – I can not post a bug report either, because on the mysql bug reporting page it says, that “cannot connect to MySQL”. That is freaking awesome – mysql’s bug reporting tool is not working because their mysql is down! In-fucking-credible!!
So, for all you guys in the same situation – you MUST remove all carriage returns in your queried before doing an ExecuteNonQuery()! Otherwise you WILL get an exception.
And for MySQL Connector/NET devs – do something about it ASAP. And by the way – this bug is also present in MySQL Connector/NET 5.0.3 (not only in 1.0.8).