Apache Drill - MySQL and DATA_READ ERROR: Failure while attempting to read from database - apache-drill

I installed Apache Drill (version 1.8.0) and configured my MySQL-Plugin as outlined in the documentation: https://drill.apache.org/docs/plugin-configuration-basics/
Everything works out and yes, I am able to test the connection.
By using
select * from myplugin.database.calc_campaigns;
I get an output. Surprisingly not for all tables. If I use
select * from myplugin.database.campaigns;
I get the following error:
Error: DATA_READ ERROR: Failure while attempting to read from database.
sql SELECT *
FROM `database`.`campaign`
plugin myplugin
Fragment 0:0
[Error Id: 2eaceb16-c09f-41bd-a139-52bc8b1d2da5 on r4c01.pmd.local:31010] (state=,code=0)
I have no glue what this error means.
Anybody can help out or got the same error?
Best
Peter

After checking the affected tables I found the problem:
Some tables contain the date "0000-00-00" which is problematic regarding java.sql.Date.
To fix this you should update the MySQL-plugin to
jdbc:mysql://localhost:3306?zeroDateTimeBehavior=convertToNull

Related

"use db_name" fails with error #1046 on MySQL, message = "no database selected"

I haven't used MySQL for a while, so forgive me if this is a silly issue with a simple solution. I have checked similar questions on the site, and in the majority of cases, the asker simply forgot to create or specify the database. This is not the case here.
I get the message
Error: #1046 No database selected
After running the following instruction
USE db_name;
For example:
USE test;
I've tried several databases, but I get the same error with all of them. Creating databases works, that is, the database is created, but the same error message is still shown. If I try to SELECT * on a table from an existing database after specifying it:
USE db_name;
SELECT * FROM table_name;
I get the error:
#1146 - Table 'db_name.table_name' doesn't exist
I'm using MariaDB, version 10.4.14 with root user.

Getting an error when trying to create derby account in SnapLogic

When I try to create a derby account in SnapLogic through the JDBC snap, I get the following error:
POST for http://prodxl-ccproxy4.fullsail.snaplogic.com:8087/api/1/rest/account/validate failed: Server Error.
So, here I have posted some error. It is because, we have to use derbyClient.jar instead derby.jar. When we want to run derby with specific to server.
Otherwise, we can use derby.jar only.

MySql to MSSQL migration

I have a database in mysql that I would like to migrate to mssql since I would like to use that database for an asp.net application.I have everything setup but anytime I try to convert the schema using SSMA(SQL Server Migration Assistant) I keep getting this error
An unexpected error occured.Please send the log file to the product support."For more information see getting SSMA assistant"
in the product documentation.
Error Message: Object reference not set to an instance of an object.
How do I get that out of the way and then migrate the data to MSSQL.
I also had the same issue. Once I installed the latest version of ssma for mysql, it resolves the issue you have mentioned above.
https://www.microsoft.com/en-us/download/details.aspx?id=51218

MySQL 5.5 : "Got an error reading communication packets"

I just upgraded MySQL from 5.1 to 5.5.
I fixed few issues running mysql_upgrade, and changing some deprecated configurations...
I also updated PHP, from 5.3.3-7 to 5.3.29-1.
But, since that, I'm having a reccurent problem (always thrown in this order) :
1. Client* - PHP Warning
Warning: Packets out of order. Expected 1 received 0. Packet size=1 in
/home/www/www.mywebsite.com/shared/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
line 694
2. Client* - PHP Warning
Warning: PDOStatement::execute() [pdostatement.execute]: Error reading
result set's header in
/home/www/www.mywebsite.com/shared/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
line 694
3. Server* - MySQL Warning :
150127 17:25:15 [Warning] Aborted connection 309 to db:
'my_database' user: 'root' host: '127.0.0.1' (Got an error
reading communication packets)
4. Client* - PHP Error
PDOStatement::execute() [pdostatement.execute]: MySQL server
has gone away in
/home/www/www.mywebsite.com/shared/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
line 694
*NB: What I call "Client" is the PHP Application, and "Server" is the MySQL Server, even if they're both on the same localhost Server.
So, apparently, the origin of all those problems is the first one : "Packets out of order".
But when I search for this error I can't find many answers, and they are most of the time not related to my problem : I use Doctrine as an abstraction, so I don't write any query or fetch any result myself. Plus, it's almost never the same values as me, but in my case I always get those values ("Expected 1 received 0. Packet size=1").
The closest result would be this MySQL bug report, but "No feedback was provided for this bug for over a month, so it is
being suspended automatically"...
Plus, some of the "2." errors aren't thrown by my PHP Doctrine code (they're not executed from my localhost, but from another known external service, probably using some old PHP Propel code).
So that might mean there is a problem with my MySQL configuration itself, but I tried changing some parameters without obtaining any obvious effect (sometimes it takes more time after restarting MySQL to get the first errors for example).
Any help would be very much appreciated !
And here is my current configuration (I've got 2 MySQL instances, the second one using replication is mostly for read only).
I also checked most of the system resources with Munin and didn't see anything abnormal (the RAM usage for example is pretty high, but as there is 50Go on the server it's not full at all).
UPDATE
I isolated an SQL query that was repeatedly failing from my PHP Client. When I executed from my local with MySQL Workbench, it did exactly the same (closed the connexion with a MySQL server has gone away message). When I did it from the sql command line it also did the same. Then I executed it from the sql command line on the server host, and it succeded. But some time after when I tried again from Workbench/whatever it worked... So it looks like those "corrupted packets" are cached and disapear after some time.
Thanks, I fixed this issue doing :
RESET QUERY CACHE;
FLUSH QUERY CACHE;

How do I suppress MySQL errors?

I have an issue where our database is receiving ~1000 updates a minute, and often we get an error response:
TAF: 1297 (HY000) at line 1: Got temporary error 899 'Rowid already allocated' from NDBCLUSTER
which appears in our application to our customer.
Is there any way to suppress these errors at the MySQL level? As I am not the developer of this application, I am not sure what language is performing the updates, but I presume either shell script or a C program.
I am using MySQL: 5.1.44-ndb-7.1.3-cluster-log (2 cluster nodes and 1 cluster mgmt node)
Have you tried using the 'IGNORE' clause in your SQL statements, the documentation for this is here
Using the IGNORE clause will downgrade errors to warnings, these warnings are displayed using the 'SHOW WARNINGS;' command