PreciousStones

PreciousStones

269k Downloads

No Longer Writes to MySQL

kbryant opened this issue ยท 3 comments

commented

Hey Phaed, I'm using the development builds (Jenkins Build #186) that you released over the weekend that helped fix the "/ps counts" and "/ps locations" mismatch... And the Emerald Block needing to be double-harvested problem. Well now a new issue just came to light. Ever since I've started using these builds the plugin can no longer write to the MySQL database. A player would place down a Protection Stone, and the protection would come up. However, after a server restart, the protection no longer exists.

I performed an experiment, I queried the "pstone_cuboids" table and observed the protections the player owns. I then have the player place the stone. It gets set correctly (we can edit flags, the protection is up, etc.). However, when I query the database, it is still not written in there.

Hopefully this is an easy fix! Thanks again for your active support on this plugin!

commented

I was able to fix it. For some reason the ID column of my new converted database was of type "int(11)" and didn't have auto_increment. I was able to query "alter table pstone_cuboids modify column id bigint(20) auto_increment;" in order to fix my "id" field.

commented

I just performed more investigation. On my test server, I deleted the pstone_cuboids table and tested it out. It writes to the database successfully.

It appears the fact that I converted from SQLite to MySQL is somehow causing it to not write to the new converted MySQL table... What are some steps I can take to fix my SQL table? I do not want to wipe my live server's entire database.

commented

Further Note: Version of Precious Stones does not matter. This happens with any version. I just happened to convert over to MySQL from SQLite this week.