I am attempting to insert over 2000 rows to MySQL. My code all works correctly but from the 2300 inserts, only the first 256 inserts get saved into my table. Is this a MySQL issue? I am testing on WinXP Pro, with MySQL 3.23 using connector-J as the driver. oh and my table is of type MyISAM. please help thanks
Actually, I would imagine that possibly you have an auto-incrementing field who's data type is set to a tiny int which only allows a signed range of -128 to 127 and an unsigned range of 0 to 255. Therfor you are only allowing 256 records to be entered into the table.
Shawn Glisson
Greenhorn
Joined: Feb 13, 2004
Posts: 6
posted
0
I have tried to committhe inserts and no gold. Also my data types for the table i am inserting to consist of 4 chars and 1 decimal(10,2). I am not sure what the problems is. Is it possible that an array in java can hold no more than 256 elements?
Originally posted by Shawn Glisson: I have tried to committhe inserts and no gold. Also my data types for the table i am inserting to consist of 4 chars and 1 decimal(10,2). I am not sure what the problems is. Is it possible that an array in java can hold no more than 256 elements?
1. Do you have an autoincrementing field? 2. What is it's data type?
Adrian Yan
Ranch Hand
Joined: Oct 02, 2000
Posts: 688
posted
0
Did you see any error in your log file? Your mysql.log will show the actually sql you are running again. See anything that's out of the ordinary. If you get an error, please copy and patste to the message.
Shawn Glisson
Greenhorn
Joined: Feb 13, 2004
Posts: 6
posted
0
I have determined that the problem is not with the db. From a jsp page I call a static method in a seperate class that receives an integer. The integers value is 2373. Here is the static method...
Now when I use the variable as the index for the arrays I only end up with 256 records instead of the 2373 that I need. BUT If I replace the variable with a number like 2000, then I get all 2373 records into the table. Of course they are all the same record but it still goes through the loop the necessary amount of times.
Try closing the statement after you execute the update. Otherwise the statement will not close till the garbage collector collects the object. Which it wont any time soon.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: MySQL will only accept the first 256 inserts?