From 0cc3d2e63cf232cf0251929c0fad79387da35ddb Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 26 Apr 2003 15:53:27 +0300 Subject: fixed incorrect number of affected rows in REPLACE...SELECT... (bug 130) sql/sql_insert.cc: fixed incorrect number of affected rows in REPLACE...SELECT... BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- sql/sql_insert.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_insert.cc') diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index ace15771449..0e7a487276d 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1392,7 +1392,7 @@ bool select_insert::send_eof() thd->cuted_fields); if (last_insert_id) thd->insert_id(last_insert_id); // For update log - ::send_ok(&thd->net,info.copied,last_insert_id,buff); + ::send_ok(&thd->net,info.copied+info.deleted,last_insert_id,buff); mysql_update_log.write(thd,thd->query,thd->query_length); return 0; } -- cgit v1.2.1 From 570158b053204cafdcd6420c03ee0ae944c1e608 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 26 Apr 2003 20:43:28 +0300 Subject: Fix for -fbranch-probabilites (bug 268) Fix for LEFT/RIGHT/MID with multi-byte-character sets (bug 314) Fix for new bison 1.875 max_insert_delayed_threads and delayed_insert_timeout now works as documented (bug 211) Don't show port in SHOW PROCESSLIST for system threads Fix problem with ORDER BY being discarded for some DISTINCT queries (bug 275) Fixed bug with NATURAL LEFT JOIN, NATURAL RIGHT JOIN and RIGHT JOIN when using many joined tables (Bug 212) acinclude.m4: Fix for -fbranch-probabilites configure.in: Fix for -fbranch-probabilites myisam/mi_open.c: Give error instead of writing to stderr (Which user can't see) mysql-test/r/join.result: Update results after change to NATURAL/LEFT/RIGHT JOIN mysql-test/r/join_outer.result: Update results after change to NATURAL/LEFT/RIGHT JOIN mysql-test/r/select.result: Update results after change to NATURAL/LEFT/RIGHT JOIN mysql-test/t/join.test: Update results after change to NATURAL/LEFT/RIGHT JOIN sql/item_strfunc.cc: Fix for LEFT/RIGHT/MID with multi-byte-character sets sql/mysqld.cc: Fix for new bison 1.875 (Wrong error text message when one got syntax error) sql/sql_class.cc: Don't show port in SHOW PROCESSLIST for system threads sql/sql_insert.cc: max_insert_delayed_threads now works as documented. delayed_insert_timeout now works on Linux sql/sql_parse.cc: Added comment sql/sql_select.cc: Fix problem with ORDER BY being discarded and results returned un-sorted sql/sql_yacc.yy: Fixed bug with NATURAL LEFT JOIN, NATURAL RIGHT JOIN and RIGHT JOIN when using many joined tables. --- sql/sql_insert.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sql/sql_insert.cc') diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 0e7a487276d..0379c1de287 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -643,6 +643,9 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) /* no match; create a new thread to handle the table */ if (!(tmp=find_handler(thd,table_list))) { + /* Don't create more than max_insert_delayed_threads */ + if (delayed_insert_threads >= max_insert_delayed_threads) + DBUG_RETURN(0); thd->proc_info="Creating delayed handler"; pthread_mutex_lock(&LOCK_delayed_create); if (!(tmp=find_handler(thd,table_list))) // Was just created @@ -1021,7 +1024,7 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg) while (!thd->killed) { int error; -#if (defined(HAVE_BROKEN_COND_TIMEDWAIT) || defined(HAVE_LINUXTHREADS)) +#if defined(HAVE_BROKEN_COND_TIMEDWAIT) error=pthread_cond_wait(&di->cond,&di->mutex); #else error=pthread_cond_timedwait(&di->cond,&di->mutex,&abstime); -- cgit v1.2.1 From dd08951771053aab47d1973fe25d4c749895e05d Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 27 Apr 2003 22:12:08 +0300 Subject: Fixed problem when comparing a key for a multi-byte-character set. (bug 152) Use 0x.... as strings if 'new' mode. (bug 152) Don't report -max on windows when InnoDB is enabled. (bug 332) Reset current_linfo; This could cause a hang when doing PURGE LOGS. Fix for row numbers in EXPLAIN (bug 322) Fix that USE_FRM works for all table types (bug 97) VC++Files/libmysql/libmysql.dsp: Added new source files myisam/mi_key.c: Fixed problem when comparing a key for a multi-byte-character set. myisam/mi_range.c: Fixed problem when comparing a key for a multi-byte-character set. myisam/mi_rkey.c: Fixed problem when comparing a key for a multi-byte-character set. myisam/mi_search.c: Fixed problem when comparing a key for a multi-byte-character set. myisam/mi_test2.c: Fixed printf statements myisam/myisamdef.h: Fixed problem when comparing a key for a multi-byte-character set. myisam/sort.c: Fixed printf statements mysql-test/r/ctype_latin1_de.result: New test results mysql-test/r/join.result: New test results mysql-test/r/repair.result: New test results mysql-test/r/rpl_alter.result: New test results mysql-test/t/ctype_latin1_de-master.opt: --new is needed to get 0x... strings to work properly mysql-test/t/ctype_latin1_de.test: New test for latin1_de mysql-test/t/repair.test: Test of USE_FRM and HEAP tables sql/field.cc: Fixed problem when comparing a key for a multi-byte-character set. sql/item.cc: Use 0x.... as strings if 'new' mode sql/item.h: Use 0x.... as strings if 'new' mode sql/mysqld.cc: Don't report -max on windows when InnoDB is enabled. sql/sql_analyse.cc: Removed unused variable sql/sql_insert.cc: Removed debug message sql/sql_repl.cc: Reset current_linfo; This could cause a hang when doing PURGE LOGS. sql/sql_select.cc: Fix for row numbers in EXPLAIN sql/sql_table.cc: Fix that USE_FRM works for all table types (without strange errors) sql/sql_yacc.yy: Removed compiler warnings. --- sql/sql_insert.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_insert.cc') diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 0379c1de287..e02f457fd77 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1029,7 +1029,7 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg) #else error=pthread_cond_timedwait(&di->cond,&di->mutex,&abstime); #ifdef EXTRA_DEBUG - if (error && error != EINTR) + if (error && error != EINTR && error != ETIMEDOUT) { fprintf(stderr, "Got error %d from pthread_cond_timedwait\n",error); DBUG_PRINT("error",("Got error %d from pthread_cond_timedwait", -- cgit v1.2.1 From 61b80c3378a5b6796a85525936e3a0595d7f2182 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 13 May 2003 18:58:26 +0300 Subject: Fix for UNION and LEFT JOIN (Bug #386) Fixed wrong logging of Access denied error (Bug #398) include/my_global.h: Fix for QNX mysql-test/r/union.result: new test case mysql-test/t/union.test: Test of bug in union and left join mysys/my_seek.c: Safety fix to find out when pos gets a wrong value sql/field.h: Fix for UNION and LEFT JOIN sql/mysql_priv.h: Fix for UNION and LEFT JOIN sql/sql_base.cc: Fix for UNION and LEFT JOIN sql/sql_insert.cc: Fix for UNION and LEFT JOIN sql/sql_parse.cc: Fixed wrong logging of Access denied error sql/sql_union.cc: Fix for UNION and LEFT JOIN sql/sql_update.cc: Fix for UNION and LEFT JOIN --- sql/sql_insert.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sql/sql_insert.cc') diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index e02f457fd77..33a13fabdc6 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -219,7 +219,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, if (fields.elements || !value_count) { restore_record(table,2); // Get empty record - if (fill_record(fields,*values) || check_null_fields(thd,table)) + if (fill_record(fields, *values, 0) || check_null_fields(thd,table)) { if (values_list.elements != 1) { @@ -236,7 +236,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, restore_record(table,2); // Get empty record else table->record[0][0]=table->record[2][0]; // Fix delete marker - if (fill_record(table->field,*values)) + if (fill_record(table->field, *values, 0)) { if (values_list.elements != 1) { @@ -1330,9 +1330,9 @@ bool select_insert::send_data(List &values) return 0; } if (fields->elements) - fill_record(*fields,values); + fill_record(*fields, values, 1); else - fill_record(table->field,values); + fill_record(table->field, values, 1); if (write_record(table,&info)) return 1; if (table->next_number_field) // Clear for next record @@ -1444,7 +1444,7 @@ bool select_create::send_data(List &values) thd->offset_limit--; return 0; } - fill_record(field,values); + fill_record(field, values, 1); if (write_record(table,&info)) return 1; if (table->next_number_field) // Clear for next record -- cgit v1.2.1