Failed to read auto-increment value from storage engine
Advertisements
Search for a lot of information online, a more consistent argument is that a mysql bug, need to upgrade the database. I have to trouble, do not upgrade my mysql. So would like to find other ways. I use the mysql console is phpmyadmin, accidentally discovered several operating options, such as optimization of the data table and on the table flush operation. Really played a role.
Concrete action is:
1. Select the destination table, click Operations, find the following Table maintenance list. Here are a few data sheet repair option.
2. Click Optimize Table, will implement the following sql statement: OPTIMIZE TABLE target_table.
3. After the return to Operations. Find Flush the table ("FLUSH"). Will implement the following sql statement:
FLUSH TABLE target_table.
At this point you can not AUTO_INCREMENT set to a large value can be received.
Project to use JPA, the database is automatically created, as to why, after you create the table AUTO_INCREMENT values will be set to a maximum value, which has still not clear. I do not know their own problems or database program, an error occurred.
Just make a record to facilitate future inquiries. If someone have similar problems, hope to exchange the next.
================================================== ==============
After the release of this article, I still did not find out the specific reasons, simply to test the database upgrade, the original version is 5.1.28, after upgrading the database version is 5.1.43. Once again rebuilt the database and found no problems. Really is a bug ah mysql database.
Related Posts of Failed to read auto-increment value from storage engine
-
Hibernate's FetchSize and MaxReslut
Previously EJB to do paging, EJBQL only provide FirstResult and MaxReslut, recently discovered by Hibernate its HQL also provides FetchSize, checked under the API found almost mean, and then found the next line so someone said: setFetchSize is an opt ...
-
js examples of common events
<html> <head> <script type="text/javascript"> / / Which mouse button is clicked function whichButton1 (event) ( if (event.button == 2) ( alert ( "You clicked the right mouse button!") ) else ( alert ( "You c ...
-
SUI-JavaScript rich UI library integration solution
Introduction: SUI is not a class implementation of the UI, nor is it a standard set of UI markup language, it is just to help the existing UI frameworks (such as Ext, YUI like) to mark the way to the statement and the creation of UI. The names of these ta
-
hibernate Technical Study Notes (first)
Introduction: Model does not match (impedance mismatch) java object-oriented language, object model, its key concepts are: inheritance, association, polymorphism, etc.; database is the relational model, its key concepts are: tables, primary keys, for ...
-
Unable to load bean: type: struts-derfault.xml abnormal
Struts2 in the use of a lot of friends from time to time we encountered this anomaly, leading to its main reason is because the wrong package, we have to be xwork-2.1.1.jar and struts2-core-2.1.2.jar, replaced xwork-2.0. 4.jar and struts2-core-2.0.14.jar
-
Hibernate II Study Notes
11. Many-to-many Of many that can be converted to two one-to-many <set name="students" table="teacher_student"> <key column="techer_id"/> <many-to-many column="student_id"/> </set> many-to-many data only from one end of the mainten
-
Hibernate primary key strategy-sequence
Today, the use of hibernate in the company encountered a troublesome problem, the use of hibernate when the primary key generation strategy set sequence, but always reported in the implementation could not get next sequence value of the error, then o ...
-
JDBC example of a long time do not have JDBC forgot
A back-up here to stay. The first: The second:
-
Hibernate pessimistic locking mechanism for locking and optimistic locking
hibernate lock mechanism 1. Pessimistic lock It refers to the modification of data by outsiders hold a conservative attitude. The assumption that at any time access to data, may also have another client to access the same data, in order to maintain t ...
-
Based on JDBC, JPA Annotation achieve simple CRUD Generic Dao
The origin of ideas are pretty long history of reasons: [Use iBATIS history] The use of iBATIS has been a long time, the system is to use the CRUD template tool to generate the code, although there are tools to generate, but looked at a lot of CRUD the Sq












