Commit graph

819 commits

Author SHA1 Message Date
Andrei Elkin
5983785ef4 WL#342 heartbeat
backporting from 6.0 code base to 5.1.
2009-09-29 14:16:23 +03:00
Mats Kindahl
d47710c8dc WL#5016: Fix header file include guards
Adding header include file guards to files that are missing such.
2009-09-23 23:32:31 +02:00
Davi Arnaut
19b325499e Manual merge. 2009-08-10 15:46:20 -03:00
Georgi Kodinov
c675beab98 merged 5.0-bugteam to 5.1-bugteam 2009-05-27 18:19:44 +03:00
Georgi Kodinov
80730df7d6 Bug #38159: Function parsing problem generates misleading error message
Added a more detailed error message on calling an ambiguous missing function.

mysql-test/r/ps.result:
  Bug #38159: fixed existing tests
mysql-test/r/sp-error.result:
  Bug #38159: test case
mysql-test/t/ps.test:
  Bug #38159: fixed existing tests
mysql-test/t/sp-error.test:
  Bug #38159: test case
sql/item_func.cc:
  Bug #38159: generate more detailed error message
sql/share/errmsg.txt:
  Bug #38159: add a more detailed error message
sql/sql_derived.cc:
  Bug #38159: treat the detailed error message the same way as the
  generic one
sql/sql_lex.cc:
  Bug #38159: 
    - detect if the token is ambiguous and print the appropriate error.
    - backport is_lex_native_function() from 5.1
sql/sql_lex.h:
  Bug #38159: detect if the token is ambiguous and print the appropriate error.
sql/sql_yacc.yy:
  Bug #38159: generate more detailed error message
sql/table.cc:
  Bug #38159: treat the detailed error message the same way as the
  generic one
2009-05-27 16:05:29 +03:00
Chad MILLER
767501a9b1 Merge community up to enterprise, thus ending the community-server
adventure.
2009-05-06 09:06:32 -04:00
Chad MILLER
ebd4f43e44 Merge fix for bug 39559 and bugteam trunk. 2009-04-10 10:18:57 -04:00
Chad MILLER
8c828507e4 Bug#39559: dump of stored procedures / functions with C-style \
comment can't be read back

A change to the lexer in 5.1 caused slash-asterisk-bang-version
sections to be terminated early if there exists a slash-asterisk-
style comment inside it.  Nesting comments is usually illegal,
but we rely on versioned comment blocks in mysqldump, and the
contents of those sections must be allowed to have comments.

The problem was that when encountering open-comment tokens and
consuming -or- passing through the contents, the "in_comment"
state at the end was clobbered with the not-in-a-comment value,
regardless of whether we were in a comment before this or not.  

So, """/*!VER one /* two */ three */""" would lose its in-comment
state between "two" and "three".  Save the echo and in-comment
state, and restore it at the end of the comment if we consume a 
comment.
2009-04-09 22:18:18 -04:00
Davi Arnaut
54bf80b633 Merge Bug#43230 into mysql-5.1-bugteam 2009-04-03 16:46:00 -03:00
Davi Arnaut
72e978828e Bug#43230: SELECT ... FOR UPDATE can hang with FLUSH TABLES WITH READ LOCK indefinitely
The problem is that a SELECT .. FOR UPDATE statement might open
a table and later wait for a impeding global read lock without
noticing whether it is holding a table that is being waited upon
the the flush phase of the process that took the global read
lock.

The same problem also affected the following statements:

LOCK TABLES .. WRITE
UPDATE .. SET (update and multi-table update)
TRUNCATE TABLE ..
LOAD DATA ..

The solution is to make the above statements wait for a impending
global read lock before opening the tables. If there is no
impending global read lock, the statement raises a temporary
protection against global read locks and progresses smoothly
towards completion.

Important notice: the patch does not try to address all possible
cases, only those which are common and can be fixed unintrusively
enough for 5.0.

mysql-test/r/lock_multi.result:
  Add test case result for Bug#43230
mysql-test/t/lock_multi.test:
  Add test case for Bug#43230
sql/sql_lex.cc:
  Initialize flag.
sql/sql_lex.h:
  Add a flag to the lexer.
sql/sql_parse.cc:
  Wait for the global read lock is a write lock is going to be
  taken. The wait is done before opening tables.
sql/sql_yacc.yy:
  Protect against the GRL if its a SELECT .. FOR UPDATE or LOCK TABLES
  .. WRITE statement.
2009-04-03 16:11:54 -03:00
Ignacio Galarza
0d588edf61 auto-merge 2009-03-17 16:29:24 -04:00
Kristofer Pettersson
ddaede8087 Bug#39843 DELETE requires write access to table in subquery in where clause
An unnecessarily restrictive lock were taken on sub-SELECTs during DELETE.

During parsing, a global structure is reused for sub-SELECTs and the attribute
keeping track of lock options were not reset properly.
This patch introduces a new attribute to keep track on the syntactical lock
option elements found in a sub-SELECT and then sets the lock options accordingly.

Now the sub-SELECTs will try to acquire a READ lock if possible
instead of a WRITE lock as inherited from the outer DELETE statement.


mysql-test/r/lock.result:
  Added test case for bug39843
mysql-test/t/lock.test:
  Added test case for bug39843
sql/sql_lex.cc:
  * Reset member variable lock_option on each new query.
sql/sql_lex.h:
  * Introduced new member variable 'lock_option' which is keeping track
    of the syntactical lock option of a (sub-)select query.
sql/sql_parse.cc:
  * Wrote comments to functions.
sql/sql_yacc.yy:
  * Introduced an attribute to keep track of syntactical lock options
    in sub-selects.
  * Made sure that the default value TL_READ_DEFAULT is at the begining
    of each subselect-rule.
2009-03-05 15:22:33 +01:00
Ignacio Galarza
5b7347bda3 Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-13 11:41:47 -05:00
Sven Sandberg
8576423de8 BUG#41924: high-level replication functions are not commented
Adding comments to some of the high-level functions in replication.

sql/log_event.h:
  Fixed some mistakes in comments.
sql/repl_failsafe.cc:
  Added comment for show_slave_hosts()
sql/slave.cc:
  Added comment for show_master_info(), handle_slave_[sql|io](), and next_event()
sql/sql_binlog.cc:
  Added @param comment.
sql/sql_lex.h:
  Added comment for st_lex_master_info.
sql/sql_repl.cc:
  Added comments for functions executing a statement:
      PURGE BINARY LOGS
      START SLAVE
      STOP SLAVE
      RESET SLAVE
      CHANGE MASTER
      RESET MASTER
      SHOW BINLOG EVENTS
      SHOW MASTER STATUS
      SHOW BINARY LOGS
2009-01-09 13:49:24 +01:00
Chad MILLER
926e5f6694 Merged from 5.0 (enterprise). 2008-12-17 15:01:34 -05:00
unknown
96e0bf50d9 Merge from mysql-5.1.30-release 2008-11-27 00:02:10 +01:00
Build Team
e85fe79430 Added "Sun Microsystems, Inc." to copyright headers on files modified
since Oct 1st
2008-11-10 21:21:49 +01:00
Mattias Jonsson
8dd07d32c9 merge 2008-11-04 08:55:43 +01:00
Mattias Jonsson
c6115db4c3 Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table

Problem was that partitioning specific commands was accepted
for non partitioned tables and treated like
ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE, after bug-20129 was fixed,
which changed the code path from mysql_alter_table to
mysql_admin_table.

Solution was to check if the table was partitioned before
trying to execute the admin command

mysql-test/r/partition_mgm_err.result:
  Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
  on non-partitioned table
  
  Updated test result
mysql-test/t/partition_mgm_err.test:
  Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
  on non-partitioned table
  
  Updated test case
sql/ha_partition.cc:
  Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
  on non-partitioned table
  
  Simplified the code by using ALTER_ADMIN_PARTITION for all
  commands that go through mysql_admin_tables and is set
  for partitioning specific commands that.
sql/ha_partition.h:
  Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
  on non-partitioned table
  
  Simplified the code by using ALTER_ADMIN_PARTITION for all
  commands that go through mysql_admin_tables and is set
  for partitioning specific commands that.
sql/sql_lex.h:
  Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
  on non-partitioned table
  
  Simplified the code by using ALTER_ADMIN_PARTITION for all
  commands that go through mysql_admin_tables and is set
  for partitioning specific commands that.
  
  Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
  added ALTER_ADMIN_PARTITION instead.
sql/sql_partition.cc:
  Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
  on non-partitioned table
  
  Simplified the code by using ALTER_ADMIN_PARTITION for all
  commands that go through mysql_admin_tables and is set
  for partitioning specific commands that.
  
  Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
  added ALTER_ADMIN_PARTITION instead.
sql/sql_table.cc:
  Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
  on non-partitioned table
  
  Give error and return if trying partitioning admin command
  on non partitioned table.
  
  Simplified the code by using ALTER_ADMIN_PARTITION for all
  commands that go through mysql_admin_tables and is set
  for partitioning specific commands that.
  
  Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
  added ALTER_ADMIN_PARTITION instead.
sql/sql_yacc.yy:
  Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
  on non-partitioned table
  
  Simplified the code by using ALTER_ADMIN_PARTITION for all
  commands that go through mysql_admin_tables and is set
  for partitioning specific commands that.
  
  Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
  added ALTER_ADMIN_PARTITION instead.
2008-10-10 20:12:38 +02:00
Gleb Shchepa
39996b44cc manual merge 5.0-5.1.29-rc --> 5.1-5.1.29-rc 2008-10-08 02:52:49 +05:00
Gleb Shchepa
f48b42e776 Bug #38691: segfault/abort in ``UPDATE ...JOIN'' while
``FLUSH TABLES WITH READ LOCK''

Concurrent execution of 1) multitable update with a
NATURAL/USING join and 2) a such query as "FLUSH TABLES
WITH READ LOCK" or "ALTER TABLE" of updating table led
to a server crash.


The mysql_multi_update_prepare() function call is optimized
to lock updating tables only, so it postpones locking to
the last, and if locking fails, it does cleanup of modified
syntax structures and repeats a query analysis.  However,
that cleanup procedure was incomplete for NATURAL/USING join
syntax data: 1) some Field_item items pointed into freed
table structures, and 2) the TABLE_LIST::join_columns fields
was not reset.

Major change:
  short-living Field *Natural_join_column::table_field has
  been replaced with long-living Item*.


mysql-test/r/lock_multi.result:
  Added test case for bug #38691.
mysql-test/t/lock_multi.test:
  Added test case for bug #38691.
sql/item.cc:
  Bug #38691: segfault/abort in ``UPDATE ...JOIN'' while
            ``FLUSH TABLES WITH READ LOCK''
  
  The Item_field constructor has been modified to allocate
  and copy original database/table/field names always (not
  during PS preparation/1st execution only), because
  an initialization of Item_field items with a pointer to
  short-living Field structures is a common practice.
sql/sql_base.cc:
  Bug #38691: segfault/abort in ``UPDATE ...JOIN'' while
            ``FLUSH TABLES WITH READ LOCK''
  
  1) Type adjustment for Natural_join_column::table_field
     (Field to Item_field);
  2) The setup_natural_join_row_types function has been
     updated to take into account new
     first_natural_join_processing flag to skip unnecessary
     reinitialization of Natural_join_column::join_columns
     during table reopening after lock_tables() failure
     (like the 'first_execution' flag for PS).
sql/sql_lex.cc:
  Bug #38691: segfault/abort in ``UPDATE ...JOIN'' while
            ``FLUSH TABLES WITH READ LOCK''
  
  Initialization of the new
  st_select_lex::first_natural_join_processing flag has
  been added.
sql/sql_lex.h:
  Bug #38691: segfault/abort in ``UPDATE ...JOIN'' while
            ``FLUSH TABLES WITH READ LOCK''
  
  The st_select_lex::first_natural_join_processing flag
  has been added to skip unnecessary rebuilding of
  NATURAL/USING JOIN structures during table reopening
  after lock_tables failure.
sql/sql_update.cc:
  Bug #38691: segfault/abort in ``UPDATE ...JOIN'' while
            ``FLUSH TABLES WITH READ LOCK''
  
  Extra cleanup calls have been added to reset
  Natural_join_column::table_field items.
sql/table.cc:
  Bug #38691: segfault/abort in ``UPDATE ...JOIN'' while
            ``FLUSH TABLES WITH READ LOCK''
  
  Type adjustment for Natural_join_column::table_field
  (Field to Item_field).
sql/table.h:
  Bug #38691: segfault/abort in ``UPDATE ...JOIN'' while
            ``FLUSH TABLES WITH READ LOCK''
  
  Type of the Natural_join_column::table_field field has
  been changed from Field that points into short-living
  TABLE memory to long-living Item_field that can be
  linked to (fixed) reopened table.
2008-10-08 02:34:00 +05:00
Gleb Shchepa
e9cb71fc3a Bug#26020: User-Defined Variables are not consistent with
columns data types

The "SELECT @lastId, @lastId := Id FROM t" query returns
different result sets depending on the type of the Id column
(INT or BIGINT).

Note: this fix doesn't cover the case when a select query
references an user variable and stored function that
updates a value of that variable, in this case a result
is indeterminate.


The server uses incorrect assumption about a constantness of
an user variable value as a select list item: 

The server caches a last query number where that variable
was changed and compares this number with a current query
number. If these numbers are different, the server guesses,
that the variable is not updating in the current query, so
a respective select list item is a constant. However, in some
common cases the server updates cached query number too late.


The server has been modified to memorize user variable
assignments during the parse phase to take them into account
on the next (query preparation) phase independently of the
order of user variable references/assignments in a select
item list.


mysql-test/r/user_var.result:
  Added test case for bug #26020.
mysql-test/t/user_var.test:
  Added test case for bug #26020.
sql/item_func.cc:
  An update of entry and update_query_id variables has been
  moved from Item_func_set_user_var::fix_fields() to a separate
  method, Item_func_set_user_var::set_entry().
sql/item_func.h:
  1. The Item_func_set_user_var::set_entry() method has been
  added to update Item_func_set_user_var::entry.
  
  2. The Item_func_set_user_var::entry_thd field has beend
  added to update Item_func_set_user_var::entry only when
  needed.
sql/sql_base.cc:
  Fix: setup_fiedls() calls Item_func_set_user_var::set_entry()
  for all items from the thd->lex->set_var_list before the first
  call of ::fix_fields().
sql/sql_lex.cc:
  The lex_start function has been modified to reset
  the st_lex::set_var_list list.
sql/sql_lex.h:
  New st_lex::set_var_list field has been added to
  memorize all user variable assignments in the current
  select query.
sql/sql_yacc.yy:
  The variable_aux rule has been modified to memorize
  in-query user variable assignments in the
  st_lex::set_var_list list.
2008-09-18 13:38:44 +05:00
Marc Alff
7f228cf20e Manual merge of mysql-5.0-bugteam -> mysql-5.1-bugteam
Note: NULL merge of sql/sql_yacc.yy, the fix for bug#38296 will be provided separately for 5.1
2008-08-11 16:44:13 -06:00
Marc Alff
e04dfffb59 Bug#38296 (low memory crash with many conditions in a query)
This fix is for 5.0 only : back porting the 6.0 patch manually

The parser code in sql/sql_yacc.yy needs to be more robust to out of
memory conditions, so that when parsing a query fails due to OOM,
the thread gracefully returns an error.

Before this fix, a new/alloc returning NULL could:
- cause a crash, if dereferencing the NULL pointer,
- produce a corrupted parsed tree, containing NULL nodes,
- alter the semantic of a query, by silently dropping token values or nodes

With this fix:
- C++ constructors are *not* executed with a NULL "this" pointer
when operator new fails.
This is achieved by declaring "operator new" with a "throw ()" clause,
so that a failed new gracefully returns NULL on OOM conditions.

- calls to new/alloc are tested for a NULL result,

- The thread diagnostic area is set to an error status when OOM occurs.
This ensures that a request failing in the server properly returns an
ER_OUT_OF_RESOURCES error to the client.

- OOM conditions cause the parser to stop immediately (MYSQL_YYABORT).
This prevents causing further crashes when using a partially built parsed
tree in further rules in the parser.

No test scripts are provided, since automating OOM failures is not
instrumented in the server.
Tested under the debugger, to verify that an error in alloc_root cause the
thread to returns gracefully all the way to the client application, with
an ER_OUT_OF_RESOURCES error.
2008-08-11 10:10:00 -06:00
Marc Alff
f34c99b4d8 Bug#35577, manual merge mysql-5.0-bugteam -> mysql-5.1-bugteam 2008-07-14 19:43:12 -06:00
Marc Alff
e73e7bb9ae Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)

The crash was caused by freeing the internal parser stack during the parser
execution.
This occured only for complex stored procedures, after reallocating the parser
stack using my_yyoverflow(), with the following C call stack:
- MYSQLparse()
- any rule calling sp_head::restore_lex()
- lex_end()
- x_free(lex->yacc_yyss), xfree(lex->yacc_yyvs)

The root cause is the implementation of stored procedures, which breaks the
assumption from 4.1 that there is only one LEX structure per parser call.

The solution is to separate the LEX structure into:
- attributes that represent a statement (the current LEX structure),
- attributes that relate to the syntax parser itself (Yacc_state),
so that parsing multiple statements in stored programs can create multiple
LEX structures while not changing the unique Yacc_state.

Now, Yacc_state and the existing Lex_input_stream are aggregated into
Parser_state, a structure that represent the complete state of the (Lexical +
Syntax) parser.


mysql-test/r/parser_stack.result:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
mysql-test/t/parser_stack.test:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
sql/sp.cc:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
sql/sp_head.cc:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
sql/sql_class.cc:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
sql/sql_class.h:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
sql/sql_lex.cc:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
sql/sql_lex.h:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
sql/sql_parse.cc:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
sql/sql_prepare.cc:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
sql/sql_trigger.cc:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
sql/sql_view.cc:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
sql/sql_yacc.yy:
  Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
  build)
2008-07-14 15:41:30 -06:00
Chad MILLER
a4e7283a92 Merge from 5.0 trunk. 2008-07-14 16:16:37 -04:00
unknown
fbbb60ce2f Merge moonbone.local:/work/27219-5.0-opt-mysql
into  moonbone.local:/work/27219-bug-5.1


sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/group_by.result:
  SCCS merged
mysql-test/t/group_by.test:
  SCCS merged
sql/item.cc:
  SCCS merged
sql/sql_lex.h:
  SCCS merged
2008-03-28 18:09:14 +03:00
unknown
9d661efd7f Bug#27219: Aggregate functions in ORDER BY.
Mixing aggregate functions and non-grouping columns is not allowed in the
ONLY_FULL_GROUP_BY mode. However in some cases the error wasn't thrown because
of insufficient check.

In order to check more thoroughly the new algorithm employs a list of outer
fields used in a sum function and a SELECT_LEX::full_group_by_flag.
Each non-outer field checked to find out whether it's aggregated or not and
the current select is marked accordingly.
All outer fields that are used under an aggregate function are added to the
Item_sum::outer_fields list and later checked by the Item_sum::check_sum_func
function.


mysql-test/t/group_by.test:
  Added a test case for the bug#27219: Aggregate functions in ORDER BY.
mysql-test/r/group_by.result:
  Added a test case for the bug#27219: Aggregate functions in ORDER BY.
sql/sql_select.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  Implementation of new check for mixing non aggregated fields and aggregation
  function in the ONLY_FULL_GROUP_BY mode.
sql/sql_lex.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  Initialization of the full_group_by_flag bitmap.
  SELECT_LEX::test_limit function doesn't reset ORDER BY
  clause anymore.
sql/sql_lex.h:
  Bug#27219: Aggregate functions in ORDER BY.
  The full_group_by_flag is added to the SELECT_LEX class.
sql/item_sum.h:
  Bug#27219: Aggregate functions in ORDER BY.
  The outer_fields list is added to the Item_sum class.
sql/mysql_priv.h:
  Bug#27219: Aggregate functions in ORDER BY.
  Defined a set of constants used in the new check for mixing non aggregated
  fields and sum functions in the ONLY_FULL_GROUP_BY_MODE.
sql/item_subselect.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  The Item_in_subselect::select_in_like_transformer function now drops
  ORDER BY clause in all selects in a subquery.
sql/item_sum.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  Now the Item_sum::check_sum_func function now checks whether fields in the
  outer_fields list are aggregated or not and marks selects accordingly.
sql/item.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  Now the Item_field::fix_fields function checks whether the field is aggregated
  or not and marks its select_lex accordingly.
2008-03-27 19:49:32 +03:00
unknown
a3e83048a3 Fix for Bug#30217: Views: changes in metadata behaviour
between 5.0 and 5.1.
  
The problem was that in the patch for Bug#11986 it was decided
to store original query in UTF8 encoding for the INFORMATION_SCHEMA.
This approach however turned out to be quite difficult to implement
properly. The main problem is to preserve the same IS-output after
dump/restore.
  
So, the fix is to rollback to the previous functionality, but also
to fix it to support multi-character-set-queries properly. The idea
is to generate INFORMATION_SCHEMA-query from the item-tree after
parsing view declaration. The IS-query should:
  - be completely in UTF8;
  - not contain character set introducers.
  
For more information, see WL4052.


mysql-test/include/ddl_i18n.check_views.inc:
  Add a test case for Bug#30217.
mysql-test/r/ddl_i18n_koi8r.result:
  Update result file.
mysql-test/r/ddl_i18n_utf8.result:
  Update result file.
mysql-test/r/information_schema.result:
  Update result file.
mysql-test/r/information_schema_db.result:
  Update result file.
mysql-test/r/mysqldump.result:
  Update result file.
mysql-test/r/show_check.result:
  Update result file.
mysql-test/t/ddl_i18n_koi8r.test:
  Add a test case for Bug#30217.
mysql-test/t/ddl_i18n_utf8.test:
  Add a test case for Bug#30217.
mysql-test/t/mysqldump.test:
  Add a test case for Bug#30217.
sql/ha_ndbcluster.cc:
  Add a parameter to print().
sql/item.cc:
  1. Add a parameter to print().
  2. Item_string::print():
        - Do not append character set introducer to the text literal
          if we're building a query for INFORMATION_SCHEMA;
        - Convert text literal to UTF8 if we're building a query
          for INFORMATION_SCHEMA.
sql/item.h:
  Add a parameter to print().
sql/item_cmpfunc.cc:
  Add a parameter to print().
sql/item_cmpfunc.h:
  Add a parameter to print().
sql/item_func.cc:
  Add a parameter to print().
sql/item_func.h:
  Add a parameter to print().
sql/item_geofunc.h:
  Add a parameter to print().
sql/item_row.cc:
  Add a parameter to print().
sql/item_row.h:
  Add a parameter to print().
sql/item_strfunc.cc:
  Add a parameter to print().
sql/item_strfunc.h:
  Add a parameter to print().
sql/item_subselect.cc:
  Add a parameter to print().
sql/item_subselect.h:
  Add a parameter to print().
sql/item_sum.cc:
  Add a parameter to print().
sql/item_sum.h:
  Add a parameter to print().
sql/item_timefunc.cc:
  Add a parameter to print().
sql/item_timefunc.h:
  Add a parameter to print().
sql/mysql_priv.h:
  Add a parameter to print().
sql/sp_head.cc:
  Add a parameter to print().
sql/sql_lex.cc:
  Add a parameter to print().
sql/sql_lex.h:
  Add a parameter to print().
sql/sql_parse.cc:
  Add a parameter to print().
sql/sql_select.cc:
  Add a parameter to print().
sql/sql_show.cc:
  Add a parameter to print().
sql/sql_test.cc:
  Add a parameter to print().
sql/sql_view.cc:
  Build INFORMATION_SCHEMA query from Item-tree.
sql/sql_yacc.yy:
  Build INFORMATION_SCHEMA query from Item-tree.
sql/table.h:
  Add a parameter to print().
2008-02-22 13:30:33 +03:00
unknown
7114fbb943 Bug#34587 Creating a view inside a stored procedure leads to a server crash
The problem is that when a stored procedure is being parsed for
the first execution, the body is copied to a temporary buffer
which is disregarded sometime after the statement is parsed.
And during this parsing phase, the rule for CREATE VIEW was
holding a reference to the string being parsed for use during
the execution of the CREATE VIEW statement, leading to invalid
memory access later.

The solution is to allocate and copy the SELECT of a CREATE
VIEW statement using the thread memory root, which is set to
the permanent arena of the stored procedure. 


mysql-test/r/view.result:
  Add test case result for Bug#34587
mysql-test/t/view.test:
  Add test case for Bug#34587
sql/sql_lex.h:
  Remove start and end position variables. The SELECT of a
  CREATE VIEW is now allocated at parse time.
sql/sql_view.cc:
  Remove assertion that is not true when the statement is
  being re-executed. Use string that was trimmed of leading
  and trailing whitespace at parse time.
sql/sql_yacc.yy:
  Allocate the SELECT of a CREATE VIEW using the current thread
  memory root and remove any leading and trailing whitespace.
2008-02-20 17:26:50 -03:00
unknown
7fd0ad21a7 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-forcollapseandmerge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


CMakeLists.txt:
  Auto merged
configure.in:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/CMakeLists.txt:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/structs.h:
  Auto merged
sql/table.h:
  Auto merged
storage/archive/ha_archive.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
client/mysqlcheck.c:
  Manual merge.
mysql-test/r/information_schema.result:
  Manual merge.
mysql-test/r/mysqlcheck.result:
  Manual merge.
mysql-test/t/mysqlcheck.test:
  Manual merge.
sql/slave.cc:
  Manual merge.
sql/sql_base.cc:
  Manual merge.
sql/sql_delete.cc:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
sql/sql_update.cc:
  Manual merge.
2007-12-14 13:42:09 -05:00
unknown
b536aa6756 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community


CMakeLists.txt:
  Auto merged
include/config-win.h:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
myisam/mi_open.c:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
mysys/my_symlink2.c:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/structs.h:
  Auto merged
sql/table.h:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
win/configure.js:
  Auto merged
Makefile.am:
  Manual merge.
client/mysqlcheck.c:
  Manual merge.
configure.in:
  Manual merge.
mysql-test/r/mysqlcheck.result:
  Manual merge.
mysql-test/t/mysqlcheck.test:
  Manual merge.
sql/sql_delete.cc:
  Manual merge.
sql/sql_update.cc:
  Manual merge.
2007-12-10 15:28:17 -05:00
unknown
569c2dcd12 Merge adventure.(none):/home/thek/Development/cpp/bug31153/my51-bug31153
into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime


sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-11-21 20:57:28 +01:00
unknown
bc54a3736f Merge adventure.(none):/home/thek/Development/cpp/bug31153/my50-bug31153
into  adventure.(none):/home/thek/Development/cpp/bug31153/my51-bug31153


sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_yacc.yy:
  Null merge.
sql/sql_base.cc:
  Manual merge
sql/sql_lex.h:
  Manual merge
2007-11-21 11:25:17 +01:00
unknown
bb681dbc88 Bug #31153 calling stored procedure crashes server if available memory is low
When the server was out of memory it crashed because of invalid memory access.

This patch adds detection for failed memory allocations and make the server
output a proper error message.


sql/mysqld.cc:
  Don't try to push_warning from within push_warning. It will cause a recursion
  until the stack is consumed.
  
  If my_net_init fails (for example: because of OOM) the temporary vio object 
  might have been attached to the thd object already. This will cause a double
  free on the vio object when the thd object is deleted later on and the server
  will crash.
sql/sp_head.cc:
  Added check for out-of-memory on a 'new' operation.
  Refactored reset_lex method to return a error state code instead of void.
  Initialize the mem-root with init_sql_alloc to get a basic error handler for
  memory allocation problems. This alone won't prevent the server from crashing,
  NULL pointers have to be accounted for as well.
sql/sp_head.h:
  Use the throw() clause in operator new, to indicate to the compiler that
  memory allocation can fail and return NULL, so that the compiler should
  generate code to check for NULL before invoking C++ constructors, to be
  crash safe.
sql/sql_base.cc:
  Use init_sql_alloc to get basic out-of-memory error handling.
sql/sql_lex.h:
  Use the throw() clause in operator new, to indicate to the compiler that
  memory allocation can fail and return NULL, so that the compiler should
  generate code to check for NULL before invoking C++ constructors, to be
  crash safe.
sql/sql_prepare.cc:
  Use init_sql_alloc to get basic out-of-memory error handling.
sql/sql_yacc.yy:
  Check for memory allocation failures where it matters.
2007-11-19 17:59:44 +01:00
unknown
1b98a962d5 Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-main
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-last_with_main


libmysqld/lib_sql.cc:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
sql/event_scheduler.cc:
  Auto merged
sql/events.cc:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_connect.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-11-12 21:09:48 +01:00
unknown
4b1e7b75b1 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  stella.local:/home2/mydev/mysql-5.1-bug31210


sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_connect.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_servers.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/table.cc:
  Auto merged
2007-11-10 11:58:41 +01:00
unknown
f0e24c795f Merge bk-internal.mysql.com:/home/bk/mysql-5.1-community
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-forcollapseandmerge


sql/ha_ndbcluster.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
sql/sql_parse.cc:
  Manual merge.
sql/sql_select.cc:
  Manual merge.
2007-11-09 14:55:32 -05:00
unknown
e5b2745efc Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table

Trying INSERT DELAYED on a partitioned table, that has not been
used right before, crashes the server. When a table is used for
select or update, it is kept open for some time. This period I
mean with "right before".

Information about partitioning of a table is stored in form of
a string in the .frm file. Parsing of this string requires a
correctly set up lexical analyzer (lex). The partitioning code
uses a new temporary instance of a lex. But it does still refer
to the previously active lex. The delayd insert thread does not
initialize its lex though...

Added initialization for thd->lex before open table in the delayed
thread and at all other places where it is necessary to call
lex_start() if all tables would be partitioned and need to parse
the .frm file.


mysql-test/r/partition_hash.result:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Added test result
mysql-test/t/partition_hash.test:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Added test
sql/event_scheduler.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/events.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/ha_ndbcluster_binlog.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/slave.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/sql_acl.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/sql_base.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Asserted that lex is initialized in open_table().
sql/sql_connect.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/sql_insert.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Added initialization for thd->lex before open table.
sql/sql_lex.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Added 'is_lex_started' to test if lex is initialized.
sql/sql_lex.h:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Added 'is_lex_started' to test if lex is initialized.
sql/sql_plugin.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/sql_servers.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/sql_udf.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/table.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Asserted that lex is initialized in open_table_from_share().
sql/tztime.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
2007-11-05 16:25:40 +01:00
unknown
bf18f6d4b8 Bug#30904 SET PASSWORD statement is non-transactional
The SET PASSWORD statement is non-transactional (no explicit transaction
boundaries) in nature and hence is forbidden inside stored functions and
triggers, but it weren't being effectively forbidden.

The implemented fix is to issue a implicit commit with every SET PASSWORD
statement, effectively prohibiting these statements in stored functions
and triggers. 


mysql-test/r/sp-error.result:
  Add test case result for Bug#30904
mysql-test/t/sp-error.test:
  Add test case for Bug#30904
sql/sql_lex.h:
  Add variable to set that a statement with SET PASSWORD causes a implicit
  commit.
sql/sql_parse.cc:
  End active transaction in SET PASSWORD.
sql/sql_yacc.yy:
  Set the correct flag on SET PASSWORD if inside a SP, thus effectively
  prohibiting SET PASSWORD statements in stored functions and triggers.
2007-10-30 20:51:04 -02:00
unknown
38ed305e15 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-recentcommmerge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1


client/mysqlcheck.c:
  Auto merged
configure.in:
  Auto merged
include/config-win.h:
  Auto merged
mysql-test/r/func_in.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/func_in.test:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
sql/sql_lex.h:
  SCCS merged
2007-10-29 12:42:06 -04:00
unknown
95a8bb20fb Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


client/client_priv.h:
  Auto merged
client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  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
sql/table.cc:
  Auto merged
storage/innobase/handler/ha_innodb.cc:
  Auto merged
storage/myisam/sort.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/query_cache.result:
  manual merge
mysql-test/include/mix1.inc:
  manual merge
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/r/type_datetime.result:
  manual merge
mysql-test/r/type_decimal.result:
  manual merge
mysql-test/t/query_cache.test:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
mysql-test/t/type_decimal.test:
  manual merge
sql/item.cc:
  manual merge
2007-10-23 19:08:21 +05:00
unknown
bf5bcb849f Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge


client/mysqlcheck.c:
  Auto merged
client/mysqltest.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-10-18 16:57:51 -06:00
unknown
f48feae696 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-comeng-unification
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-recentcommmerge


BitKeeper/deleted/.del-ha_berkeley.cc:
  Auto merged
BitKeeper/deleted/.del-mysqld.vcproj~6aa7b3f9c3e28fcb:
  Auto merged
BitKeeper/triggers/post-commit:
  Auto merged
client/mysqlcheck.c:
  Auto merged
include/config-win.h:
  Auto merged
include/my_dbug.h:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/r/func_in.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysql-test/t/func_in.test:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/structs.h:
  Auto merged
sql/table.h:
  Auto merged
storage/archive/ha_archive.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
storage/ndb/src/common/util/File.cpp:
  Auto merged
configure.in:
  Manual merge.
sql/CMakeLists.txt:
  Manual merge.
sql/mysql_priv.h:
  Manual merge.
sql/mysqld.cc:
  Manual merge.
sql/set_var.cc:
  Manual merge.
sql/slave.cc:
  Manual merge.
sql/sql_cache.cc:
  Manual merge.
sql/sql_class.cc:
  Manual merge.
sql/sql_lex.h:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
sql/sql_select.cc:
  Manual merge.
sql/sql_show.cc:
  Manual merge.
sql/sql_table.cc:
  Manual merge.
sql/sql_update.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
2007-10-17 14:05:43 -04:00
unknown
75902e8d07 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/CMakeLists.txt:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
configure.in:
  Manual merge.  Version bump.
2007-10-10 08:47:05 -04: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
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
bc25c6cafb merge of the fix for bug 27802 & 27216 to 5.1-opt
mysql-test/r/view.result:
  merge of the fix for bug 27802 to 5.1
sql/item_cmpfunc.h:
  merge of the fix for bug 27216 to 5.1
sql/sql_insert.cc:
  merge of the fix for bug 27216 to 5.1
sql/sql_lex.h:
  merge of the fix for bug 27802 to 5.1
sql/sql_select.cc:
  merge of the fix for bug 27802 to 5.1
sql/table.h:
  merge of the fix for bug 27802 to 5.1
2007-09-26 19:06:54 +03:00
unknown
5b541452a8 Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/sp.result:
  SCCS merged
mysql-test/t/sp.test:
  SCCS merged
sql/sql_lex.h:
  SCCS merged
sql/sql_parse.cc:
  SCCS merged
sql/sql_yacc.yy:
  SCCS merged
2007-09-13 00:44:50 +05:00