Commit graph

22786 commits

Author SHA1 Message Date
unknown
147eef3eba Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/31155/my51-31155


sql/item.cc:
  Auto merged
sql/item.h:
  merging
2007-10-12 15:36:51 +05:00
unknown
1ccf107a5e Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/31155/my50-31155


sql/item.cc:
  Auto merged
2007-10-12 15:35:16 +05:00
unknown
9908eceb2a Merge mysql.com:/home/hf/work/31155/my50-31155
into  mysql.com:/home/hf/work/31155/my51-31155


sql/item.h:
  Auto merged
sql/item_geofunc.h:
  Auto merged
sql/item.cc:
  merging
sql/item_geofunc.cc:
  merging
2007-10-12 15:33:26 +05:00
unknown
0d128c0746 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/30821/50-30821


sql/mysqld.cc:
  Auto merged
2007-10-12 11:30:53 +02:00
unknown
c83bff9915 Bug#30821: setting --tc_heuristic_recover tries to set myisam_stats_method
Options to mysqld were not processed correctly because switch statement
was missing some "break"s. CS adds them.

No test case; would require .opt file and server restart. Manually tested.


sql/mysqld.cc:
  Add missing "break"s to switch() in mysqld to fix option processing.
2007-10-12 11:23:45 +02:00
unknown
f22b95401e Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-27858-b


mysql-test/r/log_tables.result:
  Auto merged
2007-10-11 17:58:32 -06:00
unknown
3df1613f27 Bug#27858 (Failing to log to a log table doesn't log anything to error log)
Before this patch, failures to write to the log tables (mysql.slow_log
and mysql.general_log) were improperly printed (the time was printed twice),
or not printed at all.

With this patch, failures to write to the log tables is reported in the
error log, for all cases of failures.


mysql-test/r/log_tables.result:
  Bug#27858 (Failing to log to a log table doesn't log anything to error log)
mysql-test/t/log_tables.test:
  Bug#27858 (Failing to log to a log table doesn't log anything to error log)
sql/log.cc:
  Bug#27858 (Failing to log to a log table doesn't log anything to error log)
2007-10-11 17:55:18 -06:00
unknown
03e74b8c5e Bug#29223 declare cursor c for SHOW .....
"DECLARE CURSOR FOR SHOW ..." is a syntax that currently appears to work,
but is untested for some SHOW commands and does not work for other SHOW
commands.

Since this is an un-intended feature that leaked as a result of a coding bug
(in the parser grammar), the correct fix is to fix the grammar to not accept
this construct.

In other words, "DECLARE CURSOR FOR SHOW <other commands that don't work>"
is not considered a bug, and we will not implement other features to make all
the SHOW commands usable inside a cursor just because someone exploited a bug.


mysql-test/r/sp-error.result:
  Only allow declaring cursors for SELECT statements to avoid
  possible further confusion/problems.
mysql-test/t/information_schema.test:
  Only SELECT statements are allowed in cursors.
mysql-test/t/sp-error.test:
  Add test case for Bug#29223. Non-SELECT statements in cursors now
  yields a parser error.
sql/sql_yacc.yy:
  Rework DECLARE CURSOR statement to not allow non-SELECT statements.
2007-10-11 17:38:40 -03:00
unknown
f0fcc8c267 Merge gleb.loc:/home/uchum/work/bk/PA/5.0-opt-31471
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/create.result:
  Auto merged
mysql-test/r/null.result:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
2007-10-11 23:09:08 +05:00
unknown
1fc06a1f46 Merge gleb.loc:/home/uchum/work/bk/PA/5.0-opt-31471
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-11 22:42:11 +05:00
unknown
3ca34c102a A patch for BUG#31418: User locks misfunctioning after
mysql_change_user().

The problem was that THD::ull was not reset in THD::cleanup().

The fix is to reset it.


sql/sql_class.cc:
  Reset THD::ull after cleanup to prevent memory corruption.
tests/mysql_client_test.c:
  Add test case for BUG#31418.
2007-10-11 17:11:12 +04:00
unknown
24a567e9f6 Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
Problem: GROUP_CONCAT(DISTINCT BIT_FIELD...) uses a tree to store keys;
which are constructed using a temporary table fields,
see Item_func_group_concat::setup().
As a) we don't store null bits in the tree where the bit fields store parts 
of their data and b) there's no method to properly compare two table records
we've got problem.

Fix: convert BIT fields to INT in the temporary table used.


mysql-test/r/func_gconcat.result:
  Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
    - test result.
mysql-test/t/func_gconcat.test:
  Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
    - test case.
sql/item_sum.cc:
  Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
    - force the create_tmp_table() to convert BIT columns to INT 
      in order to be able to compare records containing BIT fields.
2007-10-11 17:20:34 +05:00
unknown
048cb42dbf after merge fix 2007-10-11 16:41:05 +05:00
unknown
937504e7a0 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/sql_yacc.yy:
  manual merge
2007-10-11 16:13:14 +05:00
unknown
f30eacb223 Bug#30981 CHAR(0x41 USING ucs2) doesn't add leading zero
Bug#30982 CHAR(..USING..) can return a not-well-formed string
Bug#30986 Character set introducer followed by a HEX string can return bad result
check_well_formed_result moved to Item from Item_str_func
fixed Item_func_char::val_str for proper ucs symbols converting
added check for well formed strings for correct conversion of constants with underscore
charset


mysql-test/r/ctype_ucs.result:
  test result
mysql-test/r/ctype_utf8.result:
  test result
mysql-test/t/ctype_ucs.test:
  test case
mysql-test/t/ctype_utf8.test:
  test case
sql/item.cc:
  check_well_formed_result() moved from Item_str_func
sql/item.h:
  check_well_formed_result() moved from Item_str_func
sql/item_strfunc.cc:
  check_well_formed_result moved to Item
  fixed Item_func_char::val_str for proper ucs symbols converting
sql/item_strfunc.h:
  check_well_formed_result moved to Item
sql/sql_yacc.yy:
  added check for well formed string
2007-10-11 16:07:10 +05:00
unknown
76af571717 Bug #31440: 'select 1 regex null' asserts debug server
The special case with NULL as a regular expression
was handled at prepare time. But in this special case
the item was not marked as fixed. This caused an assertion
at execution time.
Fixed my marking the item as fixed even when known to 
return NULL at prepare time.


mysql-test/r/func_regexp.result:
  Bug #31440: test case
mysql-test/t/func_regexp.test:
  Bug #31440: test case
sql/item_cmpfunc.cc:
  Bug #31440: mark the item as fixed even when 
  known to return NULL.
2007-10-11 11:29:26 +03:00
unknown
b24d4a977f Merge moksha.com.br:/Users/davi/mysql/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/bugs/31409-5.1


sql/sql_base.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
2007-10-10 21:16:53 -03:00
unknown
dc1ce0ba41 Mismerge broken 5.1-runtime compilation because do_command was defined
static but it's still used by another compilation unit.

Remove static qualifier from do_command definition.


sql/sql_parse.cc:
  do_command is also used by sql_connect.c in 5.1
2007-10-10 21:07:23 -03:00
unknown
d2b946c59e Merge moksha.com.br:/Users/davi/mysql/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/mysql-5.1-runtime


sql/sql_parse.cc:
  Auto merged
2007-10-10 19:44:12 -03:00
unknown
954bb0f555 Merge moksha.com.br:/Users/davi/mysql/bugs/21587-5.0
into  moksha.com.br:/Users/davi/mysql/bugs/21587-5.1


sql/sql_handler.cc:
  Auto merged
2007-10-10 18:17:11 -03:00
unknown
17c19299af Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51


configure.in:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
scripts/Makefile.am:
  Auto merged
scripts/mysql_system_tables_data.sql:
  Auto merged
scripts/mysqld_safe.sh:
  Auto merged
sql/sql_select.cc:
  Auto merged
storage/innobase/handler/ha_innodb.cc:
  Auto merged
2007-10-10 14:15:09 -06:00
unknown
5597f40f7f Merge ramayana.hindu.god:/home/tsmith/m/bk/maint/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51


sql/sql_class.cc:
  Auto merged
2007-10-10 14:01:48 -06:00
unknown
80ace29416 Bug #31517: Potential crash due to access of NULL thd in mark_transaction_to_rollback()
Introduced in mark_transaction_to_rollback(), part of fix for bug 24989;
fix is to check thd for NULL before using it.


sql/sql_class.cc:
  It is possible that mark_transaction_to_rollback() may be
  called in rare circumstances when thd is NULL (e.g., from
  some calls to convert_error_code_to_mysql()).  Don't use thd
  if it is NULL.
2007-10-10 14:00:57 -06:00
unknown
da804f3088 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


configure.in:
  Auto merged
sql/ha_partition.cc:
  Auto merged
2007-10-10 21:25:19 +02:00
unknown
219af87231 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.1-runtime
2007-10-10 14:48:25 -04:00
unknown
f9759397d2 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.0-runtime
2007-10-10 14:46:30 -04:00
unknown
c866f8015f Fixed bug #31471: decimal_bin_size: Assertion `scale >= 0 &&
precision > 0 && scale <= precision'.

A sign of a resulting item of the IFNULL function was not
updated and the maximal length of this result was calculated
improperly. Correct algorithm was copy&pasted from the IF
function implementation.


sql/item_cmpfunc.cc:
  Fixed bug #31471.
  The Item_func_ifnull::fix_length_and_dec method has been
  modified to update the Item_func_ifnull::unsigned_flag field
  and to take this field into account when calculating the
  Item_func_ifnull::max_length value.
  (See Item_func_if::fix_length_and_dec for reference).
mysql-test/t/null.test:
  Added test case for bug #31471.
mysql-test/r/null.result:
  Added test case for bug #31471.
mysql-test/r/create.result:
  Update test case after the bugfix of bug #31471.
2007-10-10 20:14:29 +05:00
unknown
3b4b925ea7 Fix for BUG#20023: mysql_change_user() resets the value
of SQL_BIG_SELECTS.

The bug was that SQL_BIG_SELECTS was not properly set
in COM_CHANGE_USER.

The fix is to update SQL_BIG_SELECTS properly.


sql/mysql_priv.h:
  Cleanup: make prepare_new_connection_state() private for module.
sql/sql_class.cc:
  Update THD::options with the respect to SQL_BIG_SELECTS
  in COM_CHANGE_USER.
sql/sql_connect.cc:
  Cleanup: make prepare_new_connection_state() private for module.
tests/mysql_client_test.c:
  Add a test case BUG#20023.
2007-10-10 17:57:01 +04:00
unknown
aec287fd67 Bug #30825: Problems when putting a non-spatial index on a GIS column
Fixed the usage of spatial data (and Point in specific) with 
 non-spatial indexes.
 Several problems :
   - The length of the Point class was not updated to include the 
     spatial reference system identifier. Fixed by increasing with 4 
     bytes.
   - The storage length of the spatial columns was not accounting for
     the length that is prepended to it. Fixed by treating the 
     spatial data columns as blobs (and thus increasing the storage
     length)
   - When creating the key image for comparison in index read wrong
     key image was created (the one needed for and r-tree search,
     not the one for b-tree/other search). Fixed by treating the
     spatial data columns as blobs (and creating the correct kind of
     image based on the index type). 


mysql-test/r/bdb_gis.result:
  Bug #30825: bdb tests
mysql-test/r/gis-rtree.result:
  Bug #30825: key length changed
mysql-test/r/gis.result:
  Bug #30825: MyISAM tests
mysql-test/r/innodb_gis.result:
  Bug #30825: InnoDB tests
mysql-test/t/bdb_gis.test:
  Bug #30825: bdb tests
mysql-test/t/gis.test:
  Bug #30825: MyISAM tests
mysql-test/t/innodb_gis.test:
  Bug #30825: InnoDB tests
sql/field.cc:
  Bug #30825: Removed Field_geom::get_key_image as Field_blog::get_key_image 
    takes type parameter into consideration and is a superset of 
    Field_geom::get_key_image()
sql/field.h:
  Bug #30825: Removed Field_geom::get_key_image as Field_blog::get_key_image 
    takes type parameter into consideration and is a superset of 
    Field_geom::get_key_image()
sql/sql_select.h:
  Bug #30825: Geometry data are a blob derivate
sql/sql_table.cc:
  Bug #30825: Increased key length to accomodate for
    spatial reference system identifier (srid)
sql/sql_yacc.yy:
  Bug #30825: Increased key length to accomodate for
    spatial reference system identifier (srid)
sql/table.cc:
  Bug #30825: It stores a length for spatial data
   as well, so increase the storage length (as it's
   done for blobs).
mysql-test/include/gis_keys.inc:
  Bug #30825: Test file for spatial data and non-spatial indexes
2007-10-10 16:26:02 +03:00
unknown
4e4f4fe51f Merge station.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged


mysql-test/t/sp.test:
  Merge.
sql/item_func.cc:
  Merge.
2007-10-10 13:35:40 +04:00
unknown
2dd78add6b Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


libmysql/libmysql.c:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-10-10 14:33:46 +05:00
unknown
6146c0c75d Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


libmysql/libmysql.c:
  Auto merged
2007-10-10 14:31:19 +05:00
unknown
9676a86aed after merge fix 2007-10-10 14:22:21 +05:00
unknown
62f72d3610 Bug#28893 --relay-log variable is not exposed with SHOW VARIABLES
added variables relay_log, relay_log_index, relay_log_info_file to init_vars[]
to make them visible within SHOW VARIABLES


mysql-test/r/rpl_flush_log_loop.result:
  test result
mysql-test/t/rpl_flush_log_loop.test:
  test case
sql/set_var.cc:
  added variables relay_log, relay_log_index, relay_log_info_file to init_vars[]
  to make them visible within SHOW VARIABLES
2007-10-10 12:21:11 +05:00
unknown
d67410b57d Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-bug30484
2007-10-10 08:30:02 +02:00
unknown
8a88cacb61 Merge mysql.com:/home/ram/work/mysql-5.1-maint
into  mysql.com:/home/ram/work/b29444/b29444.5.1
2007-10-10 10:20:19 +05:00
unknown
e952df911c Merge virtua-cwbas201-21-158-74.ctb.virtua.com.br:/Users/davi/mysql/push/bugs/28318-5.0
into  virtua-cwbas201-21-158-74.ctb.virtua.com.br:/Users/davi/mysql/push/mysql-5.0-runtime


sql/sql_yacc.yy:
  Auto merged
2007-10-09 20:48:37 -03:00
unknown
ad104d5bfd Bug#28318 CREATE FUNCTION (UDF) requires a schema
Bug#29816 Syntactically wrong query fails with misleading error message

The core problem is that an SQL-invoked function name can be a <schema
qualified routine name> that contains no <schema name>, but the mysql
parser insists that all stored procedures (function, procedures and
triggers) must have a <schema name>, which is not true for functions.
This problem is especially visible when trying to create a function
or when a query contains a syntax error after a function call (in the
same query), both will fail with a "No database selected" message if
the session is not attached to a particular schema, but the first
one should succeed and the second fail with a "syntax error" message.

Part of the fix is to revamp the sp name handling so that a schema
name may be omitted for functions -- this means that the internal
function name representation may not have a dot, which represents
that the function doesn't have a schema name. The other part is
to place schema checks after the type (function, trigger or procedure)
of the routine is known.


mysql-test/r/sp-error.result:
  Add test case result for Bug#29816
mysql-test/r/udf.result:
  Add test case result for Bug#28318
mysql-test/t/sp-error.test:
  Add test case for Bug#29816
mysql-test/t/udf.test:
  Add test case for Bug#28318
sql/sp.cc:
  Copy the (last) nul byte of the stored routine key and move name parsing
  code to the sp_name class constructor.
sql/sp_head.cc:
  Revamp routine name parsing for when no schema is specified and
  omit dot from the qualified name if the routine is not associated
  with a scheme name.
sql/sp_head.h:
  Name parsing got bigger, uninline by moving to a single unit -- the sp_head.cc
  file.
sql/sql_yacc.yy:
  Only copy the schema name if one is actually set and check for schema
  name presence only where it's necessary.
2007-10-09 20:46:33 -03:00
unknown
ad8ca7b3b4 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50


sql/mysqld.cc:
  Auto merged
2007-10-09 13:49:58 -06:00
unknown
91923ed2d4 Merge moksha.com.br:/Users/davi/mysql/push/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/push/bugs/31409-5.0
2007-10-09 16:27:54 -03:00
unknown
7d05e7e94c Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2007-10-09 11:04:45 -04:00
unknown
f57813e457 Bug#31409 RENAME TABLE causes server crash or deadlock when used with HANDLER statements
This deadlock occurs when a client issues a HANDLER ... OPEN statement
that tries to open a table that has a pending name-lock on it by another
client that also needs a name-lock on some other table which is already
open and associated to a HANDLER instance owned by the first client.
The deadlock happens because the open_table() function will back-off
and wait until the name-lock goes away, causing a circular wait if some
other name-lock is also pending for one of the open HANDLER tables.

Such situation, for example, can be easily repeated by issuing a RENAME
TABLE command in such a way that the existing table is already open
as a HANDLER table by another client and this client tries to open
a HANDLER to the new table name.

The solution is to allow handler tables with older versions (marked for
flush) to be closed before waiting for the name-lock completion. This is
safe because no other name-lock can be issued between the flush and the
check for pending name-locks.

The test case for this bug is going to be committed into 5.1 because it
requires a test feature only avaiable in 5.1 (wait_condition).


sql/sql_base.cc:
  Improve comments in the open_table() function, stating the importance
  of the handler tables flushing for the back-off process.
sql/sql_handler.cc:
  Allows handler tables flushes when opening new tables in order to avoid
  potential deadlocks. Add comments explaining the importance of the flush.
2007-10-09 12:02:59 -03:00
unknown
8ae794bbd6 Fix for bug #29444: crash with partition refering to table in create-select
Problem: creating a partitioned table during name resolution for the 
partition function we search for column names in all parts of the
CREATE TABLE query. It is superfluous (and wrong) sometimes.

Fix: launch name resolution for the partition function against
the table we're creating.


mysql-test/r/partition.result:
  Fix for bug #29444: crash with partition refering to table in create-select
    - test result.
mysql-test/t/partition.test:
  Fix for bug #29444: crash with partition refering to table in create-select
    - test result.
sql/item.cc:
  Fix for bug #29444: crash with partition refering to table in create-select
    - LEX::use_only_table_context introduced, which is used in the 
      Item_field::fix_fields() to resolve names only against
      context->first_name_resolution_table/last_name_resolution_table.
sql/sql_lex.cc:
  Fix for bug #29444: crash with partition refering to table in create-select
    - LEX::use_only_table_context introduced, which is used in the 
      Item_field::fix_fields() to resolve names only against
      context->first_name_resolution_table/last_name_resolution_table.
sql/sql_lex.h:
  Fix for bug #29444: crash with partition refering to table in create-select
    - LEX::use_only_table_context introduced, which is used in the 
      Item_field::fix_fields() to resolve names only against
      context->first_name_resolution_table/last_name_resolution_table.
sql/sql_partition.cc:
  Fix for bug #29444: crash with partition refering to table in create-select
    - set the lex->use_only_table_context before the func_expr->fix_fields()
      call to ensure we're resolving names against the table we're creating;
      then restore it back after the call.
2007-10-09 19:16:39 +05:00
unknown
09ddd95132 Merge bk-internal:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/data0/mhansson/bug31160/my51-bug31160


sql/item_timefunc.h:
  Auto merged
2007-10-09 15:35:03 +02:00
unknown
9141577596 Merge martin@mhansson.mysql.internal:/home/martin/mysql/src/bug31160/my51-bug31160
into  dl145s.mysql.com:/data0/mhansson/bug31160/my51-bug31160
2007-10-09 15:27:38 +02:00
unknown
69ecde861a Merge bk-internal:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/bug31160/my50-bug31160


sql/item_timefunc.h:
  Auto merged
2007-10-09 15:25:27 +02:00
unknown
addc2f4720 Merge martin@mhansson.mysql.internal:/home/martin/mysql/src/bug31160/my50-bug31160
into  dl145s.mysql.com:/data0/mhansson/bug31160/my50-bug31160
2007-10-09 15:23:16 +02:00
unknown
277a719247 Merge mysql.com:/home/ram/work/mysql-5.1-maint
into  mysql.com:/home/ram/work/b31438/b31438.5.1
2007-10-09 18:18:14 +05:00
unknown
d28ce15779 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31249/b31249.5.0


mysql-test/r/type_datetime.result:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
2007-10-09 18:14:13 +05:00
unknown
05903b333f Merge linux-st28.site:/home/martin/mysql/src/bug31160/my50-bug31160
into  linux-st28.site:/home/martin/mysql/src/bug31160/my51-bug31160


mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
sql/item_timefunc.h:
  Auto merged
mysql-test/t/func_time.test:
  SCCS merged
2007-10-09 15:00:06 +02:00
unknown
ae4141ed75 Bug#31160: MAKETIME() crashes server when returning NULL in ORDER BY using filesort
Even though it returns NULL, the MAKETIME function did not have this property set,
causing a failed assertion (designed to catch exactly this).
Fixed by setting the nullability property of MAKETIME().


mysql-test/r/func_sapdb.result:
  Bug#31160: Changed test result.
mysql-test/r/func_time.result:
  Bug#31160: Test result.
mysql-test/t/func_time.test:
  Bug#31160: Test case.
sql/item_timefunc.h:
  Bug#31160: The fix: Initializing maybe_null to true
2007-10-09 14:58:09 +02:00
unknown
5cdb084e09 Merge mysql.com:/home/ram/work/mysql-5.1-maint
into  mysql.com:/home/ram/work/b31438/b31438.5.1
2007-10-09 16:34:56 +05:00
unknown
12fd56a9da Merge mysql.com:/home/ram/work/b31249/b31249.5.0
into  mysql.com:/home/ram/work/b31249/b31249.5.1


sql/item_timefunc.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/type_datetime.result:
  manual merge.
mysql-test/t/type_datetime.test:
  manual merge.
2007-10-09 16:21:27 +05:00
unknown
701ea230ad Fix merge. 2007-10-09 14:53:15 +04:00
unknown
2e53f36311 Merge station.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged


sql/mysql_priv.h:
  Auto merged
sql/sql_parse.cc:
  Manual merge/
2007-10-09 14:32:43 +04:00
unknown
4f0fc8d7d5 Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  linux-st28.site:/home/martin/mysql/src/bug30832-again-push/my51-bug30832-again
2007-10-09 12:06:44 +02:00
unknown
f2d6508fb7 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bug30832-again-push/my50-bug30832-again
2007-10-09 12:04:50 +02:00
unknown
46f2f2ef11 Merge linux-st28.site:/home/martin/mysql/src/bug30832-again/my50-bug30832-again
into  linux-st28.site:/home/martin/mysql/src/bug30832-again/my51-bug30832-again


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item_func.h:
  Auto merged
2007-10-09 11:37:46 +02:00
unknown
1a5f13a12c Fix for bug #31249: Assertion `!table || (!table->write_set ||
bitmap_is_set(table->write_set, fiel

Problem: creating a temporary table we allocate the group buffer if needed
followed by table bitmaps (see create_tmp_table()). Reserving less memory for 
the group buffer than actually needed (used) for values retrieval may lead 
to overlapping with followed bitmaps in the memory pool that in turn leads 
to unpredictable consequences.

As we use Item->max_length sometimes to calculate group buffer size,
it must be set to proper value. In this particular case 
Item_datetime_typecast::max_length is too small.

Another problem is that we use max_length to calculate the group buffer
key length for items represented as DATE/TIME fields which is superfluous.

Fix: set Item_datetime_typecast::max_length properly,
accurately calculate the group buffer key length for items 
represented as DATE/TIME fields in the buffer.


mysql-test/r/type_datetime.result:
  Fix for bug #31249: Assertion `!table || (!table->write_set || 
  bitmap_is_set(table->write_set, fiel
    - test result.
mysql-test/t/type_datetime.test:
  Fix for bug #31249: Assertion `!table || (!table->write_set || 
  bitmap_is_set(table->write_set, fiel
    - test case.
sql/item_timefunc.h:
  Fix for bug #31249: Assertion `!table || (!table->write_set || 
  bitmap_is_set(table->write_set, fiel
    - set Item_datetime_typecast::max_length properly.
sql/sql_select.cc:
  Fix for bug #31249: Assertion `!table || (!table->write_set || 
  bitmap_is_set(table->write_set, fiel
    - the group buffer key length for items represented as 
  DATE/TIME fields in the buffer should be calculated using
  the maximum pack length of such fields (== 8), using 
  max_length here is redundant.
2007-10-09 14:37:21 +05:00
unknown
a462f34a94 Bug#30832:Assertion + crash with select name_const('test',now());
Completion of previous patch. Negative number were denied
as the second argument to NAME_CONST.


mysql-test/r/func_misc.result:
  Bug#30832 completion: test result
mysql-test/t/func_misc.test:
  Bug#30832 completion: test case
  added negative numbers
sql/item_func.h:
  Bug#30832 completion
  The function that represents unary minus is considered a constant if the argument is.
2007-10-09 11:36:05 +02:00
unknown
07cc799c7b Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/data0/mhansson/bug30942/my51-bug30942
2007-10-09 08:58:53 +02:00
unknown
b9805a5a45 Fixed bug #31310.
Locked rows of the InnoDB storage was silently skipped in the read-committed
isolation level.

QUICK_RANGE_SELECT for unique ranges lacks second (blocking) read
of the record that was read semi-consistently and just skip it.

The handler::read_multi_range_next method has been modified
to retry previous unique range if the previous read was
semi-consistent.


sql/handler.cc:
  Fixed bug #31310.
  The handler::read_multi_range_next method has been modified
  to retry previous unique range if the previous read was
  semi-consistent.
mysql-test/include/mix1.inc:
  Added test case for bug #31310.
mysql-test/r/innodb_mysql.result:
  Added test case for bug #31310.
2007-10-09 01:07:15 +05:00
unknown
dd3e741a61 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.1-runtime


sql/item.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2007-10-08 13:15:02 -04:00
unknown
c986d919c6 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.0-runtime


sql/item.cc:
  Auto merged
2007-10-08 13:10:55 -04:00
unknown
6859d8b8c7 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run-shell.sh:
  Auto merged
netware/mysql_test_run.c:
  Auto merged
sql/mysqld.cc:
  Auto merged
storage/ndb/include/ndbapi/Ndb.hpp:
  Auto merged
scripts/mysqld_safe.sh:
  Manual merge.
2007-10-08 12:40:21 -04:00
unknown
1711f4b02f Get rid of compilation warning. 2007-10-08 17:59:23 +04:00
unknown
fd0a679960 Fix compilation warning. 2007-10-08 17:09:28 +04:00
unknown
c0cc6d2a7a Fix for bug #31438: updatexml still crashes
Problem: check missed if the second updatexml() argument is valid.

Fix: check it.


mysql-test/r/xml.result:
  Fix for bug #31438: updatexml still crashes
    - test result.
mysql-test/t/xml.test:
  Fix for bug #31438: updatexml still crashes
    - test case.
sql/item_xmlfunc.cc:
  Fix for bug #31438: updatexml still crashes
    - check if the second argument passed to the updatexml() is valid.
2007-10-08 16:52:15 +05:00
unknown
6736d404a0 Bug #31156: mysqld: item_sum.cc:918: virtual bool
Item_sum_distinct::setup(THD*): Assertion

There was an assertion to detect a bug in ROLLUP
implementation. However the assertion is not true
when used in a subquery context with non-cacheable
statements.
Fixed by turning the assertion to accepted case
(just like it's done for the other aggregate functions). 


mysql-test/r/func_group.result:
  Bug #31156: test case
mysql-test/t/func_group.test:
  Bug #31156: test case
sql/item_sum.cc:
  Bug #31156: make it OK to call setup() several times:
   done for (e.g.) scalar subquery
2007-10-08 12:57:43 +03:00
unknown
3867aed66c Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/data0/mhansson/bug30942/my51-bug30942
2007-10-08 10:45:36 +02:00
unknown
7ac3645abd Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2007-10-08 02:05:55 +04:00
unknown
ded7fe7fd1 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime


mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
libmysql/libmysql.c:
  Manual merge.
2007-10-08 02:05:10 +04:00
unknown
db39be9510 Merge bk-internal:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31094-5.1-opt
2007-10-06 16:08:39 +03:00
unknown
6b957bcba4 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  sin.intern.azundris.com:/home/tnurnberg/31253/51-31253
2007-10-06 03:05:02 +02:00
unknown
c6e79e1143 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/31253/50-31253
2007-10-06 03:02:31 +02:00
unknown
66fd9a3473 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/19828/50-19828


mysql-test/r/grant.result:
  Auto merged
2007-10-06 00:14:22 +02:00
unknown
6f2c2dc8e8 Change URLs.
Our web server has been restructured several times, and references
to it in our source code has stayed the same.  This patch from Paul
DuBois updates all URLs to modern semantics.


debian/po/ca.po:
  Change URLs.
debian/po/cs.po:
  Change URLs.
debian/po/da.po:
  Change URLs.
debian/po/gl.po:
  Change URLs.
debian/po/ja.po:
  Change URLs.
debian/po/pt_BR.po:
  Change URLs.
debian/po/sv.po:
  Change URLs.
debian/po/tr.po:
  Change URLs.
mysql-test/lib/mtr_report.pl:
  Change URLs.
mysql-test/mysql-test-run-shell.sh:
  Change URLs.
ndb/include/ndbapi/Ndb.hpp:
  Change URLs.
netware/mysql_test_run.c:
  Change URLs.
scripts/mysqld_safe.sh:
  Change URLs.
sql/mysqld.cc:
  Change URLs.
2007-10-05 13:16:54 -04:00
unknown
b14755a12f Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  sin.intern.azundris.com:/home/tnurnberg/19828/51-19828


mysql-test/r/grant.result:
  Auto merged
sql/sql_acl.cc:
  Auto merged
2007-10-05 18:36:26 +02:00
unknown
10cde5e4b1 Bug #31094: Forcing index-based sort doesn't work anymore if joins are done
A rule was introduced by the 5.1 part of the fix for bug 27531 to 
prefer filesort over indexed ORDER BY when accessing all of the rows of a 
table (because it's faster). This new rule was not accounting for the 
presence of a LIMIT clause.
Fixed the condition for this rule so it will prefer filesort over 
indexed ORDER BY only if no LIMIT.


mysql-test/r/compress.result:
  Bug #31094: LIMIT is not considered a full index scan
mysql-test/r/join.result:
  Bug #31094: test case
mysql-test/r/select.result:
  Bug #31094: LIMIT is not considered a full index scan
mysql-test/r/ssl.result:
  Bug #31094: LIMIT is not considered a full index scan
mysql-test/r/ssl_compress.result:
  Bug #31094: LIMIT is not considered a full index scan
mysql-test/t/join.test:
  Bug #31094: test case
sql/sql_select.cc:
  Bug #31094: prefer filesort over indexed ORDER BY only if no LIMIT
2007-10-05 17:28:34 +03:00
unknown
645e6989d4 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/home/hf/work/30286/my51-30286
2007-10-05 18:56:37 +05:00
unknown
d9be8ed9eb Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/30286/my50-30286
2007-10-05 18:53:44 +05:00
unknown
adab28eb6b Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/data0/mhansson/bug30942/my51-bug30942
2007-10-05 15:20:56 +02:00
unknown
c215e78d16 Fix for BUG#20550: Stored function: wrong RETURN type metadata
when used in a VIEW.

The problem was that wrong function (create_tmp_from_item())
was used to create a temporary field for Item_func_sp.

The fix is to use create_tmp_from_field().


mysql-test/r/sp.result:
  Update result file.
mysql-test/t/sp.test:
  Add a test case for BUG#20550.
sql/item_func.h:
  Add a getter for Item_func_sp::sp_result_field.
sql/sql_select.cc:
  Use create_tmp_from_field() to create a temporary field
  for Item_func_sp.
2007-10-05 16:35:01 +04:00
unknown
a2d88511f0 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/bug30942/my50-bug30942
2007-10-05 13:42:19 +02:00
unknown
177d3c3c6a Merge mysql.com:/home/hf/work/30286/my50-30286
into  mysql.com:/home/hf/work/30286/my51-30286


mysql-test/r/gis.result:
  Auto merged
mysql-test/t/gis.test:
  Auto merged
2007-10-05 16:33:37 +05:00
unknown
071e55af0d Merge mysql.com:/home/hf/work/30286/my41-30286
into  mysql.com:/home/hf/work/30286/my50-30286


mysql-test/t/gis.test:
  Auto merged
sql/gstream.cc:
  Auto merged
mysql-test/r/gis.result:
  SCCS merged
2007-10-05 16:33:08 +05:00
unknown
3ade0a6ed5 Merge sin.intern.azundris.com:/home/tnurnberg/19828/50-19828
into  sin.intern.azundris.com:/home/tnurnberg/19828/51-19828


mysql-test/t/grant.test:
  Auto merged
sql/sql_acl.cc:
  Auto merged
mysql-test/r/grant.result:
  manual merge
2007-10-05 13:11:38 +02:00
unknown
3e1da1ae88 Merge sin.intern.azundris.com:/home/tnurnberg/31253/50-31253
into  sin.intern.azundris.com:/home/tnurnberg/31253/51-31253


sql/item.cc:
  Auto merged
mysql-test/r/type_datetime.result:
  SCCS merged
mysql-test/t/type_datetime.test:
  SCCS merged
2007-10-05 13:00:11 +02:00
unknown
2e8ca84e89 Bug #31253: crash comparing datetime to double
convert(<invalid time>, datetime) in WHERE caused crash as function
returned (void*)NULL, but did not flag SQL NULL. It does now.


mysql-test/r/type_datetime.result:
  show that convert() to datetime in a WHERE-clause will no longer crash
  the server on invalid input.
mysql-test/t/type_datetime.test:
  show that convert() to datetime in a WHERE-clause will no longer crash
  the server on invalid input.
sql/item.cc:
  When failing to process time values, do not just return (void*)NULL,
  but flag SQL NULL as well so no caller will try to process the 0x0L.
  This makes behaviour for Item::Item::val_decimal_from_date() and
  Item::Item::val_decimal_from_time() identical.
2007-10-05 12:08:38 +02:00
unknown
9d87e8f86a Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/26527/my51-26527


sql/ha_partition.cc:
  Auto merged
2007-10-05 14:21:59 +05:00
unknown
8821e9afa9 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  sin.intern.azundris.com:/home/tnurnberg/31227/51-31227
2007-10-05 10:07:08 +02:00
unknown
28232df2ae Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/31227/50-31227
2007-10-05 10:04:45 +02:00
unknown
0c984d7db3 Merge sin.intern.azundris.com:/home/tnurnberg/31227/50-31227
into  sin.intern.azundris.com:/home/tnurnberg/31227/51-31227


mysql-test/r/type_decimal.result:
  Auto merged
sql/my_decimal.cc:
  Auto merged
2007-10-05 09:47:14 +02:00
unknown
1b3d25d561 Bug#31227: memory overrun with decimal (6,6) and zerofill and group_concat
Reserve the space for the leading 0 (before the decimal point) in DECIMAL(a,a) ZEROFILL.


mysql-test/r/type_decimal.result:
  show that we allocate a large enough buffer for output of DECIMAL(a,a) [ZEROFILL].
mysql-test/t/type_decimal.test:
  show that we allocate a large enough buffer for output of DECIMAL(a,a) [ZEROFILL].
  without patch for bug#31227, valgrind will complain here; so will a
  debug build.
sql/my_decimal.cc:
  Reserve the space for the leading 0 (before the decimal point) in DECIMAL(a,a) ZEROFILL.
  Doxygenise preamble of my_decimal2string().
2007-10-05 09:38:57 +02:00
unknown
89568a9d2a Merge xiphis.org:/anubis/antony/work/p1-bug31382.1.fix-5.1
into  xiphis.org:/anubis/antony/work/p1-bug31382.1.merge-5.1
2007-10-04 17:37:51 -07:00
unknown
4686a8c8d1 fix undefined variable which can lead to crash 2007-10-04 17:34:28 -07:00
unknown
2fec8bee5b Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  moksha.local:/Users/davi/mysql/push/mysql-5.0-runtime
2007-10-04 19:56:27 -03:00
unknown
f5dd3491f2 Bug#21587 FLUSH TABLES causes server crash when used with HANDLER statements
This bug is a symptom of the way handler's tables are managed. The
most different aspect, compared to the conventional behavior, is that
the handler's tables are long lived, meaning that their lifetimes are
not bounded by the duration of the command that opened them. For this
effect the handler code uses its own list (handler_tables instead of
open_tables) to hold open handler tables so that the tables won't be
closed at the end of the command/statement. Besides the handler_tables
list, there is a hash (handler_tables_hash) which is used to associate
handler aliases to tables and to refresh the tables upon demand (flush
tables).

The current implementation doesn't work properly with refreshed tables
-- more precisely when flush commands are issued by other initiators.
This happens because when a handler open or read statement is being
processed, the associated table has to be opened or locked and, for this
matter, the open_tables and handler_tables lists are swapped so that the
new table being opened is inserted into the handler_tables list. But when
opening or locking the table, if the refresh version is different from the
thread refresh version then all used tables in the open_tables list (now
handler_tables) are refreshed. In the "refreshing" process the handler
tables are flushed (closed) without being properly unlinked from the
handler hash.

The current implementation also fails to properly discard handlers of
dropped tables, but this and other problems are going to be addressed
in the fixes for bugs 31397 and 31409.

The chosen approach tries to properly save and restore the table state
so that no table is flushed during the table open and lock operations.
The logic is almost the same as before with the list swapping, but with
a working glue code.

The test case for this bug is going to be committed into 5.1 because it
requires a test feature only avaiable in 5.1 (wait_condition).


sql/sql_handler.cc:
  Backup and reset the open_tables and handler_table lists when opening
  a new handler table and merge the opened table into the handler_tables
  list afterwards. When locking, do the same but possibly close the table
  if a refresh is pending.
2007-10-04 17:34:41 -03:00
unknown
c038fe2d92 Merge sita.local:/Users/tsmith/m/bk/50-5.0.48
into  sita.local:/Users/tsmith/m/bk/maint/50


sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2007-10-04 13:58:40 -06:00
unknown
12a6d72b0f Merge xiphis.org:/anubis/antony/work/mysql-5.1-engines
into  xiphis.org:/anubis/antony/work/p1-bug31382.1.merge-5.1
2007-10-04 11:22:52 -07:00
unknown
1c94c8e674 Bug#31382
"Disabled plugin is provoking Valgrind error"
  If there are any auto-alloced string plug-in options, memory is
  allocated during the call for handle_options(). We must free this
  memory if we are not installing the plug-in.


include/my_getopt.h:
  bug31382
    new function: my_cleanup_options()
mysys/my_getopt.c:
  bug31382
    new function: my_cleanup_options(), fini_one_value()
    alter init_variables() to take an extra option.
    forward declare init_one_value() and fini_one_value()
sql/sql_plugin.cc:
  bug31382
    after calling handle_options(), make sure to call my_cleanup_options()
    if we are not installing the plug-in.
2007-10-04 10:55:08 -07:00
unknown
9f4a592864 Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/data0/mhansson/bug30942/my51-bug30942
2007-10-04 15:32:46 +02:00
unknown
4f14c13a1c Fix for BUG#31035: select from function, group by result crasher.
This actually, fix for the patch for bug-27354. The problem with
the patch was that Item_func_sp::used_tables() was updated, but
Item_func_sp::const_item() was not. So, for Item_func_sp, we had
the following inconsistency:
  - used_tables() returned RAND_TABLE, which means that the item
    can produce "random" results;
  - but const_item() returned TRUE, which means that the item is
    a constant one.

The fix is to change Item_func_sp::const_item() behaviour: it must
return TRUE (an item is a constant one) only if a stored function
is deterministic and each of its arguments (if any) is a constant
item.


mysql-test/r/sp.result:
  Update result file.
mysql-test/t/sp.test:
  Add test cases for BUG-31035, BUG-31191, BUG-31226
sql/item_func.cc:
  Make Item::const_item() be consistent with Item::used_tables().
2007-10-04 17:19:14 +04:00
unknown
b4d566a053 Bug #30484: Partitions: crash with self-referencing trigger
Two cases in ha_partition::extra() was missing
(HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH)
which only is currently used by NDB (which not uses ha_partition)


mysql-test/r/partition.result:
  Added result for test of Bug #30484
mysql-test/t/partition.test:
  Added test for Bug #30484
sql/ha_partition.cc:
  Added HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH
  in ha_partition::extra to do nothing
  (Only currently used in NDB, which is not dependent of ha_partition)
2007-10-04 14:56:33 +02:00
unknown
fca5cbe660 after merge fix 2007-10-04 17:08:59 +05:00
unknown
68f4fab089 Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/data0/mhansson/bug30942/my51-bug30942


sql/item_timefunc.h:
  Auto merged
2007-10-04 13:58:34 +02:00
unknown
0de3ea72e8 manual merge 2007-10-04 16:35:12 +05:00
unknown
4ae273e395 Bug#30079 A check for "hidden" I_S tables is flawed
added check for hidden I_S tables for 'show columns|keys' commands


mysql-test/r/information_schema.result:
  test result
mysql-test/t/information_schema.test:
  test case
sql/sql_parse.cc:
  added check for hidden I_S tables for 'show columns|keys' commands
2007-10-04 16:20:56 +05:00
unknown
95d09ac09a Merge polly.(none):/home/kaa/src/maint/bug5731/my51-bug5731
into  polly.(none):/home/kaa/src/maint/mysql-5.1-maint


sql/set_var.cc:
  Auto merged
2007-10-04 13:38:58 +04:00
unknown
227bf9ad66 Merge polly.(none):/home/kaa/src/maint/bug5731/my50-bug5731
into  polly.(none):/home/kaa/src/maint/mysql-5.0-maint
2007-10-04 13:29:37 +04:00
unknown
4e15adf822 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


client/mysqldump.c:
  Auto merged
mysql-test/r/func_math.result:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/t/func_math.test:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/sql_view.cc:
  Auto merged
client/client_priv.h:
  manual merge
mysql-test/r/mysqldump.result:
  manual merge
mysql-test/r/view_grant.result:
  manual merge
sql/field.cc:
  manual merge
sql/sql_select.cc:
  manual merge
tests/mysql_client_test.c:
  manual merge
2007-10-04 14:23:55 +05:00
unknown
3fc334817f Merge polly.(none):/home/kaa/src/maint/bug5731/my50-bug5731
into  polly.(none):/home/kaa/src/maint/bug5731/my51-bug5731


mysql-test/r/variables.result:
  Auto merged
mysys/my_getopt.c:
  Auto merged
sql/set_var.cc:
  Auto merged
mysql-test/t/variables.test:
  Manual merge.
2007-10-04 13:07:11 +04:00
unknown
ae2956f79a Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/bug30942/my50-bug30942
2007-10-04 11:06:01 +02:00
unknown
78348d4ed1 Issue a warning if a user sets an option or a variable to a value that is greater than a defined maximum for the option/variable.
This is for bug #29446 "Specifying a myisam_sort_buffer > 4GB on 64 bit machines not possible". Support for myisam_sort_buffer_size > 4 GB on 64-bit Windows will be looked at later in 5.2.


mysql-test/r/variables.result:
  Fixed the test.
mysql-test/t/variables.test:
  Fixed the test.
mysys/my_getopt.c:
  Print a warning to the error log if a user sets an option to a value greater than the option's maximum value.
sql/set_var.cc:
  Issue an SQL warning if a user assignes a value greater than the variable's maximum value.
2007-10-04 12:34:00 +04:00
unknown
f7bf6318f5 Merge linux-st28.site:/home/martin/mysql/src/bug30942/my50-bug30942
into  linux-st28.site:/home/martin/mysql/src/bug30942/my51-bug30942


sql/item_timefunc.h:
  Auto merged
mysql-test/r/type_date.result:
  Bug#30942: Manual merge
mysql-test/t/type_date.test:
  Bug#30942: Manual merge
2007-10-04 10:06:33 +02:00
unknown
f8f021fd6b Bug #30942: select str_to_date from derived table returns varying results
The function str_to_date has a field to say whether it's invoked constant 
arguments. But this member was not initialized, causing the function to
think that it could use a cache of the format type when said cache was in 
fact not initialized.
Fixed by initializing the field to false.


mysql-test/r/type_date.result:
  Bug#30942: Test result
mysql-test/t/type_date.test:
  Bug#30942: Test case
sql/item_timefunc.h:
  Bug#30942: Initialized const_item to false
2007-10-04 09:15:26 +02:00
unknown
813e6bcbbd Bug #31155 gis types in union'd select cause crash.
We use get_geometry_type() call to decide the exact type
of a geometry field to be created (POINT, POLYGON etc)
Though this function was only implemented for few items.
In the bug's case we need to call this function for the
Item_sum instance, where it was not implemented, what is
the reason of the crash.
Fixed by implementing virtual Item::get_geometry_type(),
so it can be called for any Item.


sql/item.h:
  Bug #31155 gis types in union'd select cause crash.
  virtual Item::geometry_type() added instead of
  various geometry_type() fucntions.
sql/item.cc:
  Bug #31155 gis types in union'd select cause crash.
  
  Unified virtual ::get_geometry_type() function used
sql/item_geofunc.cc:
  Bug #31155 gis types in union'd select cause crash.
  
  virtual Item::geometry_type() implemented for geo-Items.
  Mostly previous ::get_geometry_type() implementation changed
sql/item_geofunc.h:
  Bug #31155 gis types in union'd select cause crash.
  
  get_geometry_type() declarations unified
2007-10-04 12:01:28 +05:00
unknown
ae3d4bfc0e Bug #30955 geomfromtext() crasher.
end-of-line check missed in Gis_read_stream::get_next_word,
what can lead to crashes (expecially with NULL strings).

End-of-line check added


sql/gstream.cc:
  Bug #30955 geomfromtext() crasher
mysql-test/r/gis.result:
  Bug #30955 geomfromtext() crasher.
  
  test result
mysql-test/t/gis.test:
  Bug #30955 geomfromtext() crasher.
  
  test case
2007-10-03 13:35:35 +05:00
unknown
61c8e6ca16 Bug #20358: InnoDB hang on the adaptive hash index latch in btr0sea.c
Add --skip-innodb-adaptive-hash-index option, which is a way to
work around the bug (by disabling the adaptive hash feature entirely).

This may be useful even once the bug is fixed, for benchmarking purposes.
There are some workloads for which the adaptive hash index is not effective.


sql/ha_innodb.cc:
  Add --skip-innodb-adaptive-hash-index option.
sql/ha_innodb.h:
  Add --skip-innodb-adaptive-hash-index option.
sql/mysqld.cc:
  Add --skip-innodb-adaptive-hash-index option.
sql/set_var.cc:
  Add --skip-innodb-adaptive-hash-index option.
2007-10-02 23:47:30 -06:00
unknown
fd76cce346 fixed a warning in the fix for bug 28702 2007-10-02 17:45:49 +03:00
unknown
a483299a6f Merge bk-internal:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B28702-vg-5.0-opt
2007-10-02 15:36:08 +03:00
unknown
37beea410c Fixed a valgrind warning with the fix for bug 28702. 2007-10-02 15:36:07 +03:00
unknown
6400c7a238 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/bug30832/my50-bug30832
2007-10-02 14:36:07 +02:00
unknown
832616f177 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/31095-bug-5.0-opt-mysql
2007-10-02 12:36:06 +00:00
unknown
309b7b1604 Merge polly.(none):/home/kaa/src/maint/bug5731/my51-bug5731
into  polly.(none):/home/kaa/src/maint/mysql-5.1-maint


include/my_global.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-10-02 13:39:00 +04:00
unknown
bc8d42f96d Merge polly.(none):/home/kaa/src/maint/bug5731/my50-bug5731
into  polly.(none):/home/kaa/src/maint/mysql-5.0-maint


sql/mysqld.cc:
  Auto merged
2007-10-02 13:34:33 +04:00
unknown
2b8748ca6e Merge polly.(none):/home/kaa/src/maint/bug5731/my50-bug5731_buffer_limits
into  polly.(none):/home/kaa/src/maint/bug5731/my50-bug5731


sql/mysqld.cc:
  Auto merged
2007-10-02 12:41:08 +04:00
unknown
73cb92767d Merge polly.(none):/home/kaa/src/maint/bug5731/my50-bug5731
into  polly.(none):/home/kaa/src/maint/bug5731/my51-bug5731


sql/mysqld.cc:
  Auto merged
include/keycache.h:
  Manual merge.
include/my_global.h:
  Manual merge.
include/my_sys.h:
  Manual merge.
mysys/mf_keycache.c:
  Manual merge.
mysys/my_largepage.c:
  Manual merge.
mysys/my_malloc.c:
  Manual merge.
mysys/safemalloc.c:
  Manual merge.
2007-10-02 11:32:33 +04:00
unknown
05055a45b3 Merge polly.(none):/home/kaa/src/maint/bug5731.old/my50-bug5731-read_buffer_size
into  polly.(none):/home/kaa/src/maint/bug5731/my50-bug5731


include/my_global.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-10-02 11:18:00 +04:00
unknown
1a4df8a24d Bug#31095: Unexpected NULL constant caused server crash.
The Item_func_rollup_const class is used for wrapping constants to avoid
wrong result for ROLLUP queries with DISTINCT and a constant in the select
list. This class is also used to wrap up a NULL constant but its null_value
wasn't set accordingly. This led to a server crash.

Now the null_value of an object of the Item_func_rollup_const class is set
by its fix_length_and_dec member function.


mysql-test/t/olap.test:
  Added a test case for the bug#31095: Unexpected NULL constant caused server crash.
mysql-test/r/olap.result:
  Added a test case for the bug#31095: Unexpected NULL constant caused server crash.
sql/item_func.h:
  Bug#31095: Unexpected NULL constant caused server crash. 
  Now the null_value of an object of the Item_func_rollup_const class is set
  by its fix_length_and_dec member function.
2007-10-01 20:03:50 +00:00
unknown
ee16407016 Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/data0/mhansson/bug30832/my51-bug30832
2007-10-01 19:05:23 +02:00
unknown
45b1a1c37b Merge damien-katzs-computer.local:/Users/dkatz/bug29772/my50-bug29772
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.1-runtime


sql/item.cc:
  Auto merged
2007-10-01 12:41:38 -04:00
unknown
dcb0ea80bb Merge damien-katzs-computer.local:/Users/dkatz/bug29589/my50-bug29589
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.1-runtime


sql/set_var.cc:
  merge conflicting changes
2007-10-01 12:37:43 -04:00
unknown
e2f73f6d6d Merge damien-katzs-computer.local:/Users/dkatz/bug29772/my50-bug29772
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.0-runtime
2007-10-01 12:33:59 -04:00
unknown
7d0c68dd44 Merge damien-katzs-computer.local:/Users/dkatz/bug29589/my50-bug29589
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.0-runtime
2007-10-01 12:32:17 -04:00
unknown
11476cfc04 BUG#30472: libmysql doesn't reset charset, insert_id after
succ. mysql_change_user() call.

Use 2 bytes for character set number.
2007-10-01 15:41:18 +04:00
unknown
163ba66c3f merge 5.0-opt -> 5.1-opt
mysql-test/r/func_math.result:
  Auto merged
mysql-test/t/func_math.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
2007-10-01 12:56:25 +03:00
unknown
82e6e6fb66 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG30583/mysql-5.1-engines


sql/ha_partition.cc:
  Auto merged
2007-10-01 14:23:16 +05:00
unknown
3b9b52b79a Merge linux-st28.site:/home/martin/mysql/src/bug30832/my50-bug30832
into  linux-st28.site:/home/martin/mysql/src/bug30832/my51-bug30832


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item.h:
  Auto merged
2007-10-01 09:11:45 +02:00
unknown
842fe93b0b Merge moksha.local:/Users/davi/mysql/push/mysql-5.1-runtime
into  moksha.local:/Users/davi/mysql/push/bugs/21136-regression
2007-09-29 16:06:46 -03:00
unknown
1241a9da2f The fix for BUG 21136 (ChangeSet@1.2611.1.1) introduced a regression that
caused a few tests to fail because the thd->extra_lock wasn't being set to
NULL after the table was unlocked. This poses a serious problem because later
attempts to access thd->extra_lock (now a dangling pointer) will probably
result in a crash (undefined behavior) -- and that's what actually happens
in some test cases.

The solution is to set the select_create::m_plock pointee to NULL, which
means that thd->extra_lock is set to NULL when the lock data is not for a
temporary table.


sql/sql_insert.cc:
  Set the m_plock pointee to NULL, thus avoiding a dangling thd->extra_lock pointer
  in some cases.
2007-09-29 16:04:31 -03:00
unknown
084cbc7ed8 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/27990-bug-5.0-opt-mysql


sql/field.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-09-28 23:27:23 +00:00
unknown
6a8bd84a82 Bug#27990: Wrong info in MYSQL_FIELD struct members when a tmp table was used.
The change_to_use_tmp_fields function leaves the orig_table member of an
expression's tmp table field filled for the new Item_field being created.
Later orig_table is used by the Field::make_field function to provide some
info about original table and field name to a user. This is ok for a field
but for an expression it should be empty.

The change_to_use_tmp_fields function now resets orig_table member of
an expression's tmp table field to prevent providing a wrong info to a user.
The Field::make_field function now resets the table_name and the org_col_name
variables when the orig_table is set to 0.


sql/field.cc:
  Bug#27990: Wrong info in MYSQL_FIELD struct members when a tmp table was used.
  The Field::make_field function now resets the table_name and the org_col_name
  variables when the orig_table is set to 0.
sql/sql_select.cc:
  Bug#27990: Wrong info in MYSQL_FIELD struct members when a tmp table was used.
  The change_to_use_tmp_fields function now resets orig_table member of
  an expression's tmp table field to prevent providing a wrong info to a user.
tests/mysql_client_test.c:
  The test case for the bug#21635 is altered to test behavior on both const and
  non-const tables.
2007-09-28 23:24:40 +00:00
unknown
ee7f61ab05 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  station.:/mnt/raid/alik/MySQL/devel/bug-30472/5.1-rt-bug30472
2007-09-29 02:47:19 +04:00
unknown
3c66a859be Post-merge fix for Bug 21136, initial merge missed the modifications for
the sql_class.h file.


sql/sql_class.h:
  Add pointers for holding lock data for temporary tables.
2007-09-28 19:11:26 -03:00
unknown
6e668b4f5b Bug#21136 CREATE TABLE SELECT within CREATE TABLE SELECT causes server crash
When CREATE TEMPORARY TABLE .. SELECT is invoked from a stored function
which in turn is called from CREATE TABLE SELECT causes a memory leak
because the inner create temporary table overrides the outter extra_lock
reference when locking the table.

The solution is to simply not overrride the extra_lock by only using the
extra_lock for a non-temporary table lock.


mysql-test/r/create.result:
  Add test case result for Bug#21136
mysql-test/t/create.test:
  Add test case for Bug#21136
sql/sql_insert.cc:
  For temporary tables, store the lock data within the select_create class
  since tmp tables contents are not replicated. For "real" tables, store
  the lock data in the thread extra_lock pointer.
2007-09-28 18:25:47 -03:00
unknown
5adfe1b25d Bug #29589 sys_innodb_max_purge_lag is defined twice in sys_variables
Removed duplicate innodb variable from sys_variables array.


sql/set_var.cc:
  Removed duplicate innodb variable from sys_variables array.
2007-09-28 17:13:35 -04:00
unknown
8ded280f3f Bug #29772 Error compiling with option --without-geometry
Added #ifdef HAVE_SPATIAL around geometry related code.


sql/item.cc:
  Added #ifdef HAVE_SPATIAL around geometry related code.
2007-09-28 17:10:14 -04:00
unknown
20b08f4705 Patch for BUG#30472: libmysql doesn't reset charset,
insert_id after succ. mysql_change_user() call.

See also WL 4066.
  
This bug reveals two problems:
  - the problem on the client side which was described originally;
  - the problem in protocol / the server side: connection context
    on client and server should be like after mysql_real_connect()
    and be consistent. The server however just resets character
    set variables to the global defaults.

The fix seems to be as follows:
  - extend the protocol so that the client be able to send
    character set information in COM_CHANGE_USER command;
  - change the server so that it understands client character set
    in the command;
  - change the client:
    - reset character set to the default value (which has been
      read from the configuration);
    - send character set in COM_CHANGE_USER command.


client/client_priv.h:
  Declare a function, used in libmysql.c and client.c.
libmysql/libmysql.c:
  1. Reset character set on the client in mysql_change_user().
  2. Send character set to the server in COM_CHANGE_USER command.
mysql-test/t/mysql_client_test.test:
  mysql_client_test.log is used by the test suite.
  
  Use mysql_client_test.out.log to collect mysql_client_test
  real output.
sql/sql_parse.cc:
  Switch character set in COM_CHANGE_USER.
tests/mysql_client_test.c:
  Test case for BUG#30472.
2007-09-28 23:30:54 +04:00
unknown
ec90b2c5a4 Merge trift2.:/MySQL/M51/clone-5.1
into  trift2.:/MySQL/M51/push-5.1

This is mysql-5.1.22-rc.


mysql-test/r/innodb_mysql.result:
  Auto merged
scripts/mysqld_safe.sh:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/sql_select.cc:
  Manual merge - the 31001 bug is already fixed.
mysql-test/include/mix1.inc:
  Manual merge - should not have conflicted at all.
2007-09-28 20:33:46 +02:00