fearialtog
asked on
MYSQL is limiting the number of table rows to 32,767
I am running Apache Friends XAMPP.with MySQL client version: 5.0.51b
I am using a script to populate a table but for some reason the table will not take more than 32,767 rows. I have used both the Alter and Create New table statements to set max rows. Both queries return a message to say that they were successful yet the number of rows above will not go above 32,767.
There appears to be nothing in the MYSQL manual to suggest that this limit exists. The only references are to a 2GB limit. Any one got any ideas?
ALTER TABLE my_table MAX_ROWS=100000;
I am using a script to populate a table but for some reason the table will not take more than 32,767 rows. I have used both the Alter and Create New table statements to set max rows. Both queries return a message to say that they were successful yet the number of rows above will not go above 32,767.
There appears to be nothing in the MYSQL manual to suggest that this limit exists. The only references are to a 2GB limit. Any one got any ideas?
ALTER TABLE my_table MAX_ROWS=100000;
How exactly are you getting the number of records? MyISAM can hold 2^32 rows unless disk runs out so i don't think thats an issue. What IS an issue is that many row number reporting commands /methods are inacurate.
The maximum table size is normally determined by operating system limits on number amd size of files, not by MySQL directly.
http://dev.mysql.com/doc/refman/5.0/en/full-table.html
http://dev.mysql.com/doc/refman/5.0/en/full-table.html
what db engine you are using?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
please see the limits set in the php.ini file if you are running the code through the web interface.
the php ini file has a maximum execution time limit, maximum memory consumed by a single script, etc values which can cause a script to break when inserting rows into mysql.
the error would not be with mysql but more often with php.
the php ini file has a maximum execution time limit, maximum memory consumed by a single script, etc values which can cause a script to break when inserting rows into mysql.
the error would not be with mysql but more often with php.
ASKER
Thank you
You were spot on. The auto increment field was set to small int.
You were spot on. The auto increment field was set to small int.
ASKER
Thank you to all the experts who replied.
The problem turned out to be with the auto increment field which was set to small int.
The magic number 32767 appears in the mysql manual below
http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html
Type Bytes Minimum Value Maximum Value
SMALLINT 2 -32768 32767
Thank you for your help.
The problem turned out to be with the auto increment field which was set to small int.
The magic number 32767 appears in the mysql manual below
http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html
Type Bytes Minimum Value Maximum Value
SMALLINT 2 -32768 32767
Thank you for your help.