Petter Larsson writes:
Hi,
I recantly upgraded from 3.22.32 to 3.23.35 using an rpm from
www.mysql.com.
My platform: Redhat Linux 2.2.14 i686
The problem is now that UPDATE do not always succed. I get a query OK
but no
update is done unless the same query is issued once again.
This problem is not constant but rather comes and go.
Case 1: Failure
mysql select * from test;
++---+
| id | value |
++---+
| 1 |xx |
++---+
1 row in set (0.00 sec)
mysql update test set value='yy' where id=1;
Query OK, 0 rows affected (0.00 sec)
mysql select * from test;
++---+
| id | value |
++---+
| 1 |xx |
++---+
1 row in set (0.00 sec)
Case 2: Failure first time, but second time the update is done
mysql select * from test;
++---+
| id | value |
++---+
| 1 |xx |
++---+
1 row in set (0.00 sec)
mysql update test set value='yy' where id=1;
Query OK, 0 rows affected (0.00 sec)
mysql update test set value='yy' where id=1;
Query OK, 1 row affected (0.00 sec)
mysql select * from test;
++---+
| id | value |
++---+
| 1 |yy |
++---+
1 row in set (0.00 sec)
Does anyone understand this ? becouse I am lost !
regards
Petter
Hi!
3.23.36 will be soon out with the above problem fixed.
If you can't wait and if you can build from sources, here is a patch:
= sql/sql_load.cc 1.22 vs edited =
*** /tmp/sql_load.cc-1.22-24964 Sun Dec 24 15:18:59 2000
--- edited/sql/sql_load.cc Wed Mar 21 19:38:21 2001
***
*** 91,97
else
{ // Part field list
thd-dupp_field=0;
! if (setup_fields(thd,table_list,fields,1,0) 0)
DBUG_RETURN(-1);
if (thd-dupp_field)
{
--- 91,97
else
{ // Part field list
thd-dupp_field=0;
! if (setup_tables(table_list) || setup_fields(thd,table_list,fields,1,0))
DBUG_RETURN(-1);
if (thd-dupp_field)
{
= sql/sql_insert.cc 1.34 vs edited =
*** /tmp/sql_insert.cc-1.34-24964 Tue Mar 13 11:44:01 2001
--- edited/sql/sql_insert.ccWed Mar 21 19:38:21 2001
***
*** 78,84
table_list.grant=table-grant;
thd-dupp_field=0;
! if (setup_fields(thd,table_list,fields,1,0))
return -1;
if (thd-dupp_field)
{
--- 78,84
table_list.grant=table-grant;
thd-dupp_field=0;
! if (setup_tables(table_list) || setup_fields(thd,table_list,fields,1,0))
return -1;
if (thd-dupp_field)
{
***
*** 151,157
save_time_stamp=table-time_stamp;
values= its++;
if (check_insert_fields(thd,table,fields,*values,1) ||
! setup_fields(thd,table_list,*values,0,0))
{
table-time_stamp=save_time_stamp;
goto abort;
--- 151,157
save_time_stamp=table-time_stamp;
values= its++;
if (check_insert_fields(thd,table,fields,*values,1) ||
! setup_tables(table_list) || setup_fields(thd,table_list,*values,0,0))
{
table-time_stamp=save_time_stamp;
goto abort;
***
*** 168,174
table-time_stamp=save_time_stamp;
goto abort;
}
! if (setup_fields(thd,table_list,*values,0,0))
{
table-time_stamp=save_time_stamp;
goto abort;
--- 168,174
table-time_stamp=save_time_stamp;
goto abort;
}
! if (setup_tables(table_list) || setup_fields(thd,table_list,*values,0,0))
{
table-time_stamp=save_time_stamp;
goto abort;
= sql/sql_base.cc 1.67 vs edited =
*** /tmp/sql_base.cc-1.67-24964 Sat Mar 3 03:03:12 2001
--- edited/sql/sql_base.cc Wed Mar 21 19:34:56 2001
***
*** 39,45
List_iteratorItem *it);
static void free_cache_entry(TABLE *entry);
static void mysql_rm_tmp_tables(void);
! static key_map get_key_map_from_key_list(THD *thd, TABLE *table,
ListString *index_list);
--- 39,45
List_iteratorItem *it);
static void free_cache_entry(TABLE *entry);
static void mysql_rm_tmp_tables(void);
! static key_map get_key_map_from_key_list(TABLE *table,
ListString *index_list);
***
*** 1711,1721
return found;
}
-
/
** Check that all given fields exists and fill struct with current data
- ** Check also that the 'used keys' and 'ignored keys' exists and set up the
- ** table structure accordingly
/
int setup_fields(THD *thd, TABLE_LIST *tables, ListItem fields,
--- 1711,1718
***
***