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

Can't export to MySQL 5.5 in JabRef 3.2 #685

Closed
yuyaoshen opened this issue Jan 20, 2016 · 8 comments
Closed

Can't export to MySQL 5.5 in JabRef 3.2 #685

yuyaoshen opened this issue Jan 20, 2016 · 8 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs

Comments

@yuyaoshen
Copy link

I'm using Jabref 3.2 and MySQL 5.5, but now I can't export my .bib to SQL database. It is fine when i am using 2.10, I don't know why.
The error is: 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 'INSERT INTO entries (jabref_eid, entry_types_id, cite_key, abstract, address, an' at line 1.
Can someone help me with this?

@oscargus oscargus added the bug Confirmed bugs or reports that are very likely to be bugs label Jan 20, 2016
@koppor
Copy link
Member

koppor commented Jan 21, 2016

Is it possible to post a minimal, complete, and verifiable example? Is there a minimal bib file which is not working at your side? Which OS are you running?

@yuyaoshen
Copy link
Author

This is the example. If there is only one record, the export will fine, but if there two, it error.
I'm running Ubuntu 14.04.
test.bib.txt

@Siedlerchr
Copy link
Member

I'll take a look at that.

@yuyaoshen
Edit// I can confirm this with MySql 5.5 on Windows 7 and the latest version from git.

@Siedlerchr
Copy link
Member

I looked into the code and interestingly the generated statement works when it's executed directly on the Mysql Database. I will look further into this issue-

@Siedlerchr
Copy link
Member

I found the reason for the error and a fix!
The problem is, that the usage of multiple statements at once has to be specified in the Connection String. So, the solution is to simply add the parameter ?allowMultiQueries=true.

I'll prepare a Pull Request.

[StackOverlow Answer to the Problem](http://stackoverflow.com/questions/10797794/multiple-queries-executed-in-java-in-single-statement

@yuyaoshen
Copy link
Author

so where should I add this parameter, I'm using .jar file. Thanks very much.

@Siedlerchr
Copy link
Member

@yuyaoshen It has to be fixed in the code. Wait for a new release.

@yuyaoshen
Copy link
Author

@Siedlerchr Thanks again, waiting for the new release

Siedlerchr added a commit to Siedlerchr/jabref that referenced this issue Feb 20, 2016
…abRef#685

Added ability to add server specific connection parameters in dbStrings, because MySQL and PostreSQL parameter names differ.

Using setCatalog instead of use database (recommended in mysql doc see: https://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html , Section  "Initial Database for Connection" )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs
Projects
None yet
Development

No branches or pull requests

5 participants