Commit graph

14055 commits

Author SHA1 Message Date
unknown
365f6f6f03 foo2
sql/ha_innodb.cc:
  Import patch foo2
sql/ha_innodb.h:
  Import patch foo2
sql/handler.cc:
  Import patch foo2
sql/handler.h:
  Import patch foo2
sql/mysqld.cc:
  Import patch foo2
sql/set_var.cc:
  Import patch foo2
sql/sql_class.h:
  Import patch foo2
sql/sql_repl.cc:
  Import patch foo2
2006-04-13 17:22:56 +09:30
unknown
ce33555014 foo1
sql/ha_innodb.cc:
  Import patch foo1
sql/ha_innodb.h:
  Import patch foo1
sql/handler.cc:
  Import patch foo1
sql/handler.h:
  Import patch foo1
sql/mysqld.cc:
  Import patch foo1
sql/set_var.cc:
  Import patch foo1
sql/sql_class.h:
  Import patch foo1
sql/sql_repl.cc:
  Import patch foo1
2006-04-13 17:20:33 +09:30
unknown
c16b9dfcaa Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2006-04-12 16:14:20 -07:00
unknown
c5ed5c4b1c Post-merge fixes. Add a new error message for max_prepared_stmt_count
limit.


mysql-test/r/ps.result:
  Post-merge fixes.
mysql-test/t/ps.test:
  Post-merge fixes.
sql/share/errmsg.txt:
  Add a new error message for max_prepared_stmt_count limit,
  we can do it in 5.0
sql/sql_class.cc:
  Post-merge fixes.
sql/sql_class.h:
  Post-merge fixes.
sql/sql_prepare.cc:
  Post-merge fixes.
2006-04-13 01:46:44 +04:00
unknown
e46a193be8 Merge mysql.com:/opt/local/work/mysql-4.1-16365
into  mysql.com:/opt/local/work/mysql-5.0-merge


sql/set_var.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
sql/item_row.cc:
  Manual merge.
sql/item_row.h:
  Manual merge.
sql/mysql_priv.h:
  Manual merge.
sql/mysqld.cc:
  Manual merge.
sql/set_var.h:
  Manual merge.
sql/sql_class.cc:
  Manual merge.
sql/sql_class.h:
  Manual merge.
sql/sql_prepare.cc:
  Manual merge.
2006-04-12 18:30:54 +04:00
unknown
b54cb499a7 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2006-04-11 11:46:28 -07:00
unknown
c97aa492e5 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/ram/work/5.0.b14360
2006-04-11 23:46:27 +05:00
unknown
8907bf0af7 Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/alexi/bugs/mysql-5.0-merge


sql/sql_insert.cc:
  Auto merged
2006-04-11 22:46:26 +04:00
unknown
981bbaef87 Fixed bug #18618.
If the second or the third argument of a BETWEEN predicate was
a constant expression, like '2005.09.01' - INTERVAL 6 MONTH,
while the other two arguments were fields then the predicate 
was evaluated incorrectly and the query returned a wrong
result set.
The bug was introduced in 5.0.17 when in the fix for 12612.


mysql-test/r/func_time.result:
  Added a test case for bug #18618.
mysql-test/t/func_time.test:
  Added a test case for bug #18618.
2006-04-11 10:03:37 -07:00
unknown
961725aa51 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/ram/work/5.0.b14360
2006-04-11 18:14:34 +05:00
unknown
1ef739636a Fix for bug #14360: Date Between Interval Broken.
mysql-test/r/innodb.result:
  Fix for bug #14360: Date Between Interval Broken.                               
    - test case.
mysql-test/t/innodb.test:
  Fix for bug #14360: Date Between Interval Broken.                               
    - test case.
sql/item_timefunc.cc:
  Fix for bug #14360: Date Between Interval Broken.                               
    - Item_date_add_interval::eq() introduced.
sql/item_timefunc.h:
  Fix for bug #14360: Date Between Interval Broken.                               
    - Item_date_add_interval::eq() introduced.
2006-04-11 16:13:57 +05:00
unknown
3d860b131a Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug5390
2006-04-11 12:41:26 +02:00
unknown
3b1a0c8738 Add surrounding braces, move invalidate dictionary_cace to after declaration of variable "table_list" 2006-04-11 09:46:03 +02:00
unknown
3c3928089f Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


mysql-test/mysql-test-run.pl:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-04-11 09:09:21 +02:00
unknown
4c46f306db Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug5390
2006-04-11 08:46:48 +02:00
unknown
e70d0971df Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2006-04-10 16:17:46 -07:00
unknown
15bec6c5e5 Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-04-10 14:30:00 -07:00
unknown
7d384e4633 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2006-04-10 13:04:25 -07:00
unknown
2ccae984d1 Merge mysql.com:/home/jimw/my/mysql-5.0-13601
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2006-04-10 11:23:30 -07:00
unknown
35d9a7b874 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug5390
2006-04-10 17:58:21 +02:00
unknown
e9ea296127 Fixed BUG#15868: InnoDB hangs under 200 threads making INSERTs: 'thread thrashing'.
Applied changes due Heikki Tuuri.


sql/mysqld.cc:
  Set innodb_thread_concurrency default value to 8 (Bug#15868).
   Changes due to Heikki Tuuri.
2006-04-10 19:47:41 +04:00
unknown
8abfc0e755 Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/alexi/bugs/mysql-5.0-15758
2006-04-09 20:14:29 +04:00
unknown
6051eb31b5 Merge mysql.com:/users/lthalmann/bk/mysql-5.0-release-bug18116
into  mysql.com:/users/lthalmann/bk/mysql-5.0
2006-04-09 10:40:52 +02:00
unknown
e536c8eca7 Fixed bug #16069.
The function agg_cmp_type in item_cmpfunc.cc neglected the fact that 
the first argument in a BETWEEN/IN predicate could be a field of a view.
As a result in the case when the retrieved table was hidden by a view 
over it and the arguments in the BETWEEN/IN predicates are of 
the date/time type the function did not perform conversion of 
the constant arguments to the same format as the first field argument.
If formats of the arguments differed it caused wrong a evaluation of
the predicates.


mysql-test/r/view.result:
  Added a test case for bug #16069.
mysql-test/t/view.test:
  Added a test case for bug #16069.
2006-04-08 11:42:09 -07:00
unknown
67cbda06b9 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  dl145j.mysql.com:/tmp/5.0.21-bug17284-temp_table
2006-04-07 22:42:55 +02:00
unknown
372901addf Fixed BUG#15758: "Holding adaptive search latch in
innobase_query_caching_of_table_permitted()".
 Applied the patch due to Heikki Tuuri.
 Also removed superfluous #ifdefs.


sql/sql_cache.cc:
  Applied the patch due to Heikki Tuuri.
   Query_cache::store_query(): Make InnoDB to release the adaptive
   hash index latch before MySQL acquires the query cache mutex.
sql/sql_class.cc:
  Removing superfluous #ifdefs (suggested by Sanja, also discussed with Serg).
sql/sql_cursor.cc:
  Removing superfluous #ifdefs (suggested by Sanja, also discussed with Serg).
2006-04-07 23:58:17 +04:00
unknown
f37d610147 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-16365


sql/mysql_priv.h:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/r/ps.result:
  Manual merge
mysql-test/t/ps.test:
  Manual merge
2006-04-07 23:50:45 +04:00
unknown
5b5530daa5 A fix and a test case for Bug#16365 "Prepared Statements: DoS with
too many open statements". The patch adds a new global variable
@@max_prepared_stmt_count. This variable limits the total number
of prepared statements in the server. The default value of
@@max_prepared_stmt_count is 16382. 16382 small statements
(a select against 3 tables with GROUP, ORDER and LIMIT) consume 
100MB of RAM. Once this limit has been reached, the server will 
refuse to prepare a new statement and return ER_UNKNOWN_ERROR 
(unfortunately, we can't add new errors to 4.1 without breaking 5.0). The limit is changeable after startup
and can accept any value from 0 to 1 million. In case
the new value of the limit is less than the current
statement count, no new statements can be added, while the old
still can be used. Additionally, the current count of prepared 
statements is now available through a global read-only variable 
@@prepared_stmt_count.


mysql-test/r/ps.result:
  Test results fixed (a test case for Bug#16365)
mysql-test/t/ps.test:
  A test case for Bug#16365 "Prepared Statements: DoS with too many 
  open statements". Also fix statement leaks in other tests.
sql/mysql_priv.h:
  Add declarations for new global variables.
sql/mysqld.cc:
  Add definitions of max_prepared_stmt_count, prepared_stmt_count.
sql/set_var.cc:
  Implement support for @@prepared_stmt_count and 
  @@max_prepared_stmt_count. Currently these variables are queried
  without acquiring LOCK_prepared_stmt_count due to limitations of
  the set_var/sys_var class design. Updates are, however, protected 
  with a lock.
sql/set_var.h:
  New declarations to add support for @@max_prepared_stmt_count.
  Implement a new class, where the lock to be used when updating
  a variable is a parameter.
sql/sql_class.cc:
  Add accounting of the total number of prepared statements in the
  server to the methods of Statement_map.
sql/sql_class.h:
  Add accounting of the total number of prepared statements in the
  server to the methods of Statement_map.
sql/sql_prepare.cc:
  Statement_map::insert will now send a message in case of an
  error.
2006-04-07 23:37:06 +04:00
unknown
9b6e83f4b8 A fix and a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?))
gives wrong results". Implement previously missing 
Item_row::cleanup. The bug is not repeatable in 5.0, probably 
due to a coincidence: the problem is present in 5.0 as well.


mysql-test/r/ps.result:
  Update the result file (Bug#16248)
mysql-test/t/ps.test:
  Add a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?)) gives 
  wrong results"
sql/item_row.cc:
  Implement Item_row::cleanup(): we should reset used_tables_cache
  before reexecution of a prepared statement. In case ROW
  arguments contain a placeholder, used_tables_cache has PARAM_TABLE
  bit set in statement prepare. As a result, when executing a statement,
  the condition push down algorithm (make_cond_for_table) would think
  that the WHERE clause belongs to the non-existent PARAM_TABLE and
  wouldn't attach the WHERE clause to any of the real tables, 
  effectively optimizing the clause away.
sql/item_row.h:
  Remove a never used member 'array_holder'. Add declaration for
  Item_row::cleanup.
2006-04-07 22:26:25 +04:00
unknown
34a72d8d93 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/FIXES/5.0.21-bug17284-temp_table
2006-04-07 21:21:23 +03:00
unknown
3ab267bf81 Bug#17284 erroneous temp table cleanup on slave.
Idea of the fix is for master to send FD event with `created' as 0
     to reconnecting slave (upon slave_net_timeout, no master crash) to avoid destroying temp tables.
     In a case of a connect by slave to the master after its crash temp tables have been already
     cleaned up so that slave can not keep `orphan' temp tables.


mysql-test/r/rpl_temporary.result:
  results
mysql-test/t/rpl_temporary.test:
  wait-free addon to check temp tables are ok after slave reconnect.
sql/sql_repl.cc:
  Storing zero for assigning to `created' of FD event on the reconnecting slave.
mysql-test/include/get_binlog_dump_thread_id.inc:
  mysqltest's preudo-macro to calculate $id master dump thread id
2006-04-07 20:44:37 +03:00
unknown
e93fe1e4c5 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into  rurik.mysql.com:/home/igor/mysql-5.0
2006-04-07 10:19:09 -07:00
unknown
94bfe767b2 Merge neptunus.(none):/home/msvensson/mysql/bug13228/my50-bug13228_minimal
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


sql/ha_ndbcluster.cc:
  Auto merged
2006-04-07 11:46:22 +02:00
unknown
f7b039cc50 fix for wrong QUARTER calculation in EXTRACT() (Bug #18100)
mysql-test/r/func_time.result:
  expected test results for bug #18100 added
mysql-test/t/func_time.test:
  test case for bug #18100 added
sql/item_timefunc.cc:
  wrong formula for EXTRACT QUARTER, now uses the same calculus as the QUARTER()
  function
2006-04-07 11:15:15 +02:00
unknown
f3de57d982 Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


mysql-test/mysql-test-run.pl:
  Auto merged
2006-04-07 11:04:46 +02:00
unknown
2f2607faef Fix for bug#18281 group_concat changes charset to binary
skip charset aggregation for order columns
2006-04-07 13:19:31 +05:00
unknown
998b9d8b14 Fixed bug #15917: unexpected complain for a NIST test case.
The problem was due to the fact that with --lower-case-table-names set to 1 
the function find_field_in_group did not convert the prefix 'HU' in
HU.PROJ.CITY into lower case when looking for it in the group list. Yet the
names in the group list were extended by the database name in lower case.


mysql-test/r/having.result:
  Added a test case for bug #15917.
mysql-test/t/having.test:
  Added a test case for bug #15917.
sql/item.cc:
  Fixed bug #15917: unexpected complain for a NIST test case.
  The problem was due to the fact that with --lower-case-table-names set to 1 
  the function find_field_in_group did not convert the prefix 'HU' in
  HU.PROJ.CITY into lower case when looking for it in the group list. Yet the
  names in the group list were extended by the database name in lower case.
  The needed conversion was added to the code of find_field_in_group.
2006-04-06 15:29:15 -07:00
unknown
8ec7190dac Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/psergey/mysql-5.0-bug18237-review
2006-04-06 21:42:33 +04:00
unknown
3daaa8d5f4 Remove redundant code in opt_sum_query() 2006-04-06 21:42:03 +04:00
unknown
b3dad93478 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into  april.(none):/home/svoj/devel/mysql/BUG14945/mysql-5.0
2006-04-06 15:25:39 +05:00
unknown
ee3cf23b5c Fix for bug#14945 "Truncate table doesn't reset the auto_increment
counter".

When TRUNCATE TABLE was called within an stored procedure the
auto_increment counter was not reset to 0 even if straight
TRUNCATE for this table did this.

This fix makes TRUNCATE in stored procedures to be handled exactly
in the same way as straight TRUNCATE. We achieve this by rolling
back the fix for bug 8850, which is no longer needed since stored
procedures don't require prelocked mode anymore (and TRUNCATE is
not allowed in stored functions or triggers).


mysql-test/r/sp.result:
  Test case for BUG#14945.
mysql-test/t/sp.test:
  Test case for BUG#14945.
sql/sql_delete.cc:
  Handle TRUNCATE in stored procedures exactly in the same way as straight
  TRUNCATE (i.e. without falling back to DELETE if possible). We achieve
  this by rolling back the fix for bug 8850, which is no longer relevant
  since stored procedures don't require prelocked mode anymore
  (and TRUNCATE is not allowed in stored functions or triggers).
sql/sql_parse.cc:
  Handle TRUNCATE in stored procedures exactly in the same way as straight
  TRUNCATE (i.e. without falling back to DELETE if possible). We achieve
  this by rolling back the fix for bug 8850, which is no longer relevant
  since stored procedures don't require prelocked mode anymore
  (and TRUNCATE is not allowed in stored functions or triggers).
2006-04-06 15:19:01 +05:00
unknown
cabe285995 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2006-04-05 14:06:34 -07:00
unknown
23549493aa BUG#5390 - problems with merge tables
Additional fix for INSERT DELAYED with subselect.
Originally detected in 5.1, but 5.0 could also be affected.
The user thread creates a dummy table object,
which is not included in the lock. The 'real' table is
opened and locked by the 'delayed' system thread.
The dummy object is now marked as not locked and this is
tested in mysql_lock_have_duplicate().


sql/lock.cc:
  BUG#5390 - problems with merge tables
  Additional fix for INSERT DELAYED with subselect.
  The user thread creates a dummy table object,
  which is not included in the lock.
  Changed to safer asserts.
sql/sql_insert.cc:
  BUG#5390 - problems with merge tables
  Marked the dummy table object as not being
  included in the lock.
2006-04-05 14:39:20 +02:00
unknown
6fa5591544 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug5390


sql/table.h:
  Auto merged
2006-04-05 11:38:16 +02:00
unknown
af5e4098a8 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into sunlight.local:/local_work/16281-bug-5.0-mysql


sql/field.h:
  Auto merged
2006-04-05 13:30:51 +04:00
unknown
0f8c11758d Fixed bug #16281: Multi-table update broken in 5.0 on tables imported from 4.1
Mutli-table uses temporary table to store new values for fields. With the
new values the rowid of the record to be updated is stored in a Field_string
field. Table to be updated is set as source table of the rowid field.
But when the temporary table creates the tmp field for the rowid field it
converts it to a varstring field because the table to be updated was created by
the v4.1. Due to this the stored rowids were broken and no records for 
update were found.

The flag can_alter_field_type is added to Field_string class. When it is set to
0 the field won't be converted to varstring. The Field_string::type() function 
now always returns MYSQL_TYPE_STRING if can_alter_field_type is set to 0.
The multi_update::initialize_tables() function now sets can_alter_field_type
flag to 0 for the rowid fields denying conversion of the field to a varstring
field.



sql/field.h:
  Fixed bug #16281: Multi-table update broken in 5.0 on tables imported from 4.1
  The flag can_alter_field_type is added to Field_string class. When it is set to
  0 the field won't be converted to varstring.
  The Field_string::type() function now always returns MYSQL_TYPE_STRING if 
  can_alter_field_type is set to 0.
sql/sql_update.cc:
  Fixed bug #16281: Multi-table update broken in 5.0 on tables imported from 4.1
  The multi_update::initialize_tables() function now sets can_alter_field_type
  flag to 0 for the rowid fields denying conversion of the field to a varstring
  field.
2006-04-05 13:29:04 +04:00
unknown
6d5997b05e use "unsigned long" type just as in function declaration and add surrounding parentheses. 2006-04-05 11:20:12 +02:00
unknown
b3b626c31c Bug #13601: Wrong int type for bit
The wrong value was being reported as the field_length for BIT
  fields, resulting in confusion for at least Connector/J. The
  field_length is now always the number of bits in the field, as
  it should be.


mysql-test/r/type_bit.result:
  Add new results
mysql-test/r/type_bit_innodb.result:
  Add new results
mysql-test/t/type_bit.test:
  Add new regression test
mysql-test/t/type_bit_innodb.test:
  Add new regression test
sql/field.cc:
  Fix Field_bit->field_length to actually report the display width, and
  store the bytes stored in the rec in the new bytes_in_rec member.
sql/field.h:
  Fix Field_bit::field_length to store the correct value, adding
  Field_bit::bytes_in_rec to remember the number of bytes used for
  storing the value. Remove Field_bit_as_char::create_length, as it
  is now redundant.
sql/ha_ndbcluster.cc:
  Handle field_length of Field_bit actually being the display width (# of bits).
sql/key.cc:
  Fix inappropriate use of field->field_length for BIT field.
2006-04-04 17:54:58 -07:00
unknown
ec984b8c9d Fixed BUG#13683: INSERT DELAYED into a view creates an infinite loop.
The bug was caused by wrong behaviour of mysql_insert() which in case
 of INSERT DELAYED into a view exited with thd->net.report_error == 0.
 This blocked error reporting to the client which started waiting
 infinitely for response to the query.


mysql-test/r/insert.result:
  Fixed results for the added test case.
mysql-test/t/insert.test:
  Added test case.
sql/sql_insert.cc:
  Fixed BUG#13683: INSERT DELAYED into a view creates an infinite loop.
   Changed mysql_insert(): delayed_get_table() applied to a view exits
   with ER_WRONG_OBJECT error (and with thd->net.report_error == 1) and
   in this case we must just exit from mysql_insert().  Prior to this
   change, instead of exiting open_and_lock_tables() was invoked which
   cleared thd->net.report_error to zero and caused the bug.
2006-04-05 01:09:07 +04:00
unknown
e77888f530 Fixed bug #18237.
The code in opt_sum_query that prevented the COUNT/MIN/MAX 
optimization from being applied to outer joins  was not adjusted 
after introducing nested joins. As a result if an outer join
contained a reference to a view as an inner table the code of
opt_sum_query missed the presence of an on expressions and
erroneously applied the mentioned optimization.


mysql-test/r/view.result:
  Added a test case for bug #18237.
mysql-test/t/view.test:
  Added a test case for bug #18237.
2006-04-04 12:55:02 -07:00