Re: large replaces truncating...
I'm still trying to figure out what's going on here.. I've now tried it in
PHP and am getting the same response... Ie, given this simple script:
<?php
// set no time limit (just in case)
set_time_limit(0);
// build a data array
for ($i=0;$i<100000;$i++)
$data .= $i."\t";
// build the sql
$sql = "REPLACE into reflectivity.measurement_extended_data
set content_typeID = 1,
contentID = 1, arrayID = 1,
positionID = 1, testID = 1,
iteration = 1, test_locationID = 1,
date_added = 1,
added_by = 18,
data = '".$data."'";
// connect to db and execute query
mysql_connect('localhost','root');
mysql_query($sql);
// return an error if there is one
echo mysql_errno().': '.mysql_error()."\n";
// close the database
mysql_close();
?>
The data field in the table truncates like this:
| <snip>
12750 12751 12752 12753 12754 12755 12756 12757 12758
12759 12760 12761 12762 12763 12764 12765 12766 12767
12768 12769 12770 12771 12772 12773 1 |
It always truncates in the exact same location. I can drop the table and
recreate but it still truncates in the exact same location.
The query, when echoed out is sane ending indeed on 99999.
Here's the table again:
mysql> desc measurement_extended_data;
+-----------------+-----------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+-----------------------+------+-----+---------+-------+
| content_typeID | tinyint(3) unsigned | | PRI | 0 | |
| contentID | int(10) unsigned | | PRI | 0 | |
| arrayID | smallint(5) unsigned | | PRI | 0 | |
| positionID | mediumint(8) unsigned | | PRI | 0 | |
| testID | smallint(5) unsigned | | PRI | 0 | |
| iteration | smallint(5) unsigned | | PRI | 0 | |
| test_locationID | smallint(5) unsigned | | MUL | 0 | |
| date_added | int(10) unsigned | | | 0 | |
| added_by | mediumint(8) unsigned | | | 0 | |
| data | blob | | | | |
+-----------------+-----------------------+------+-----+---------+-------+
(Note.. I've even tried changing data to a text NOT NULL).. exact same
truncation location).
The php script above reports no error.
** The UPDATE log (when turned on) shows the ENTIRE query (ie.. the query
is at least making it to the database long enough to be logged).
Again.. the my.cnf:
# MySQL Configuration File
#
# One can use all long options that the program supports.
# Run the program with --help to get a list of available options
# This will be passed to all mysql clients
[client]
port = 3306
socket = /tmp/mysql.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
set-variable = key_buffer=256M
set-variable = max_allowed_packet=7M # INCREASED FOR MORE DATA
set-variable = thread_stack=128K
set-variable = back_log=50
set-variable = max_connections=2250
set-variable = tmp_table_size=15M
set-variable = table_cache=6000
set-variable = sort_buffer=3584K
set-variable = join_buffer=512K
set-variable = connect_timeout=2
set-variable = record_buffer=1M
set-variable = flush_time=900
set-variable = wait_timeout=300
[mysqldump]
quick
set-variable = max_allowed_packet=16M
[mysql]
no-auto-rehash
[myisamchk]
set-variable = key_buffer=32M
set-variable = sort_buffer_size=48M
Any new ideas?
Seth
> Seth Northrop writes:
> >
> >
> > 010624 19:44:23 Aborted connection 231 to db: 'unconnected' user: 'root'
> > host: `localhost' (Got timeout reading communication packets)
> >
> >
> The above only implies that your program exited without calling
> mysql_close(). Nothing to do with your problem.
>
> But, as I told you , you did not quote string constants.
>
> And shoot out your resulting string to some file for inspection. That
> might help you find your error.
>
>
>
---
Seth Northrop
Manager of Information Technology
Reflectivity, Inc.
3910 Freedom Circle, Suite 103
Santa Clara, CA 95054
voice: 408-970-8881 x147
fax: 408-970-8840
http://www.reflectivity.com/
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php