Commit graph

52710 commits

Author SHA1 Message Date
unknown
2967e4e104 Use an API instead of looking into stmt internals to fetch fields
(Test for Bug#32265)


tests/mysql_client_test.c:
  Use an API instead of looking into stmt internals to fetch fields.
2008-02-26 13:55:46 +03:00
unknown
98e7d709bb Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  whirlpool.hristov.com:/work/mysql-5.1-runtime
2008-02-22 20:33:07 +01:00
unknown
e70944d494 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  dipika.(none):/opt/local/work/mysql-5.1-runtime
2008-02-22 21:49:44 +03:00
unknown
d6989496e8 Update new test results after merge (Bug#12713) 2008-02-22 21:49:16 +03:00
unknown
233143fd31 Fix for Bug#29605
--local-infile=0 checks can be bypassed by sending a FETCH LOCAL FILE response
  
Add a check for CLIENT_LOCAL_FILES before sending a local file.
Beware, that all binary distributions enable sending of local files and it's up
to the programs which use libmysql to disable it, if they don't use this functionality.
Otherwise they are not safe.


client/mysqltest.c:
  Enable LOAD DATA LOCAL INFILE for the test suite, like some rpl and ndb test.
sql-common/client.c:
  Check if the client has LOAD DATA LOCAL INFILE disabled and
  don't serve such requests from the server. This is not 100% proof,
  as if the client has this enabled, in all binary builds for BC,
  the check won't work and the client can be tricked into sending a
  local file.
tests/mysql_client_test.c:
  Switch on LOCAL INFILE in client test. If one day there
  is a test which uses it, then it will work out of the box.
2008-02-22 18:45:45 +01:00
unknown
0dedada2ff Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  whirlpool.hristov.com:/work/mysql-5.1-runtime


sql/events.cc:
  Auto merged
2008-02-22 16:20:05 +01:00
unknown
5d6ca9c2a3 Fix for bug#22738 Events: After stop and start disabled events could reside in the queue
Disabled events weren't removed from the memory queue after the scheduler has been
re-enabled. After recalculation of next execution time of an event, it might get disabled.


sql/event_queue.cc:
  Sort the event queue in a way that the disabled events will always be
  at the end. We will use this for cleaning it, starting from the end.
  
  After recalculating times in the queue, after the scheduler has been enabled
  after disabled state, the queue should be cleaned from DISABLED events.
  The queue is sorted in a way such that the disabled events are at the end.
  Thus, we can start from the end of the queue and remove all DISABLED till we
  find the first with different state.
sql/events.cc:
  Add a comment about possible problem with replication of events,
  disabled events and server restarts.
2008-02-22 16:18:31 +01:00
unknown
5990242fff Update new tests after merge. 2008-02-22 17:51:57 +03:00
unknown
5d26f63c95 An unused variable (compile-time warning).
sql/sql_view.cc:
  An unused variable.
2008-02-22 17:45:09 +03:00
unknown
c9be87d081 Disable concurrent inserts for the kill.test
mysql-test/r/kill.result:
  Update test case result.
mysql-test/t/disabled.def:
  Re-enable kill test, bug was closed.
mysql-test/t/kill.test:
  Disable concurrent inserts for the kill test.
2008-02-22 12:26:08 -02:00
unknown
6f04497027 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  buzz.(none):/home/davi/mysql-5.1-runtime
2008-02-22 10:36:36 -02:00
unknown
c3801d9627 Fix lock_multi test case failure related to
concurrent inserts.


mysql-test/t/lock_multi.test:
  Wait for the concurrent insert to finish.
2008-02-22 10:35:08 -02:00
unknown
00ff33cf8a Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  quad.:/mnt/raid/alik/MySQL/devel/bug-30217/5.1-rt-bug30217


sql/item.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
2008-02-22 13:56:44 +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
3676f5188e Post-merge fixes for bug 32890
mysql-test/r/ps.result:
  Update test case results
sql/item.h:
  Manual merge
sql/sql_view.cc:
  Manual merge
2008-02-21 23:58:45 -02:00
unknown
955b3e3d0b Merge buzz.(none):/home/davi/mysql-5.0-runtime
into  buzz.(none):/home/davi/mysql-5.1-runtime


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/sql_view.h:
  Auto merged
sql/item.h:
  Manual merge
sql/sql_prepare.cc:
  Manual merge
sql/sql_view.cc:
  Manual merge
2008-02-21 23:21:52 -02:00
unknown
9f245df853 Post-merge fix to silence compiler warning.
sql/sql_prepare.cc:
  Removed unused variable.
2008-02-21 19:28:25 -02:00
unknown
315665cf67 Bug#32890 Crash after repeated create and drop of tables and views
The problem is that CREATE VIEW statements inside prepared statements
weren't being expanded during the prepare phase, which leads to objects
not being allocated in the appropriate memory arenas.

The solution is to perform the validation of CREATE VIEW statements
during the prepare phase of a prepared statement. The validation
during the prepare phase assures that transformations of the parsed
tree will use the permanent arena of the prepared statement.


mysql-test/r/ps.result:
  Add test case result for Bug#32890
mysql-test/t/ps.test:
  Add test case for Bug#32890
sql/item.h:
  Restore original field name if name is auto generated.
sql/sql_prepare.cc:
  Validate and prepare a CREATE VIEW statement for execution.
sql/sql_view.cc:
  Move privileges check to it's own function.
sql/sql_view.h:
  Export function which check privileges of a CREATE VIEW statement.
2008-02-21 14:58:29 -03:00
unknown
d8c8fd5b4f Fix for Bug#33065: Mysql not writing general query logs after
sending SIGHUP.

There were two problems:
  - after some recent fix, the server started to crash after
    receiving SIGHUP. That happened because LEX of new THD-object
    was not properly initialized.
  - user-specified log options were ignored when logs were reopened.

The fix is to 1) initialize LEX and 2) take user-specified options
into account.

There is no test case in this CS, because our test suite does not
support sending SIGHUP to the server.


sql/mysqld.cc:
  Use proper logging after SIGHUP.
sql/sql_parse.cc:
  Initialize LEX of new THD -- it is required to avoid crash
  in SIGHUP handling.
2008-02-21 14:49:27 +03:00
unknown
ffd88cb2bd Fix merge (fix result file) 2008-02-21 12:48:55 +03:00
unknown
9bbf256cb3 Merge quad.:/mnt/raid/alik/MySQL/devel/bug-34337/5.0-rt-bug34337
into  quad.:/mnt/raid/alik/MySQL/devel/bug-34337/5.1-rt-bug34337


mysql-test/r/view_grant.result:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/sql_view.cc:
  Auto merged
mysql-test/t/view.test:
  Manually merged.
2008-02-21 12:24:40 +03:00
unknown
fa08b28085 Fix for Bug#34337: Server crash when Altering a view using
a table name.
  
The problem was that fill_defined_view_parts() did not return
an error if a table is going to be altered. That happened if
the table was already in the table cache. In that case,
open_table() returned non-NULL value (valid TABLE-instance from
the cache).
  
The fix is to ensure that an error is thrown even if the table
is in the cache.

(This is a backport of the original patch for 5.1)


mysql-test/r/view.result:
  Fix result file.
mysql-test/r/view_grant.result:
  Fix result file.
mysql-test/t/view.test:
  Add a test case for Bug#34337: Server crash when Altering a view
  using a table name.
mysql-test/t/view_grant.test:
  Fix order-dependency.
sql/sql_view.cc:
  Report an error if we're going to work with a table.
2008-02-21 12:17:32 +03:00
unknown
88421ee503 Post-merge fixes for bugs 34587 and 32265.
mysql-test/r/view.result:
  Drop created view.
mysql-test/t/view.test:
  Update test result.
sql/sql_cursor.cc:
  Fix compilation failure.
tests/mysql_client_test.c:
  Manual merge.
2008-02-20 23:30:29 -02:00
unknown
96b4648b01 Merge buzz.(none):/home/davi/mysql-5.0-runtime
into  buzz.(none):/home/davi/mysql-5.1-runtime


sql/sql_cursor.cc:
  Auto merged
tests/mysql_client_test.c:
  SCCS merged
2008-02-20 23:18:40 -02:00
unknown
d34f8384b3 Post-merge fix to silence a compilation warning introduced
by patch for bug 32265 .


tests/mysql_client_test.c:
  Removed unused variable.
2008-02-20 22:11:06 -03:00
unknown
25ac83c0a9 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_view.cc:
  Auto merged
2008-02-20 17:30:12 -03:00
unknown
43717ba1d1 Merge mysql.com:/Users/davi/mysql/bugs/34587-5.1
into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime


sql/sql_view.cc:
  Auto merged
2008-02-20 17:29:29 -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
a399fefd56 Bug#32265 Server returns different metadata if prepared statement is used
Executing a prepared statement associated with a materialized
cursor yields to the client a metadata packet with wrong table
and database names. The problem was occurring because the server
was sending the the name of the temporary table used by the cursor
instead of the table name of the original table. The same problem
occurs when selecting from views, in which case the table name was
being sent and not the name of the view.
  
The solution is to fill the list item from the temporary table but
preserving the table and database names of the original fields. This
is achieved by tweaking the Select_materialize to accept a pointer to
the Materialized_cursor class which contains the item list to be filled.


sql/sql_cursor.cc:
  Fill the item list in the send_fields method and preserve
  the table and database name of the fields.
tests/mysql_client_test.c:
  Add test case for Bug#32265
2008-02-20 16:45:24 -03:00
unknown
985e952347 Fix for Bug#34337: Server crash when Altering a view using
a table name.

The problem was that fill_defined_view_parts() did not return
an error if a table is going to be altered. That happened if
the table was already in the table cache. In that case,
open_table() returned non-NULL value (valid TABLE-instance from
the cache).

The fix is to ensure that an error is thrown even if the table
is in the cache.


mysql-test/r/view.result:
  Fix result file.
mysql-test/t/view.test:
  Add a test case for Bug#34337: Server crash when Altering a view
  using a table name.
sql/sql_view.cc:
  Report an error if we're going to work with a table.
2008-02-20 22:23:39 +03:00
unknown
0b6bc7ef84 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  dipika.(none):/opt/local/work/mysql-5.1-runtime
2008-02-20 00:32:03 +03:00
unknown
533d435463 Fix a compilation failure of the community tree. 2008-02-19 23:47:15 +03:00
unknown
86301df6d4 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime


sql/sql_update.cc:
  Auto merged
2008-02-19 10:39:14 -03:00
unknown
90313b02e2 Merge mysql.com:/Users/davi/mysql/bugs/23771-5.1
into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime
2008-02-19 10:36:31 -03:00
unknown
9060b50f14 Rename send_eof() to my_eof() for consistency with my_ok() and my_error() 2008-02-19 15:58:08 +03:00
unknown
14021c96c4 Rename send_ok to my_ok. Similarly to my_error, it only records the status,
does not send it to the client.
2008-02-19 15:45:21 +03:00
unknown
ead02981ea Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  dipika.(none):/opt/local/work/mysql-5.1-2pc-opt-merge-push


mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/suite/rpl_ndb/t/disabled.def:
  Manual merge.
2008-02-19 14:53:22 +03:00
unknown
526798dbb5 A fix and a test case for Bug#12713 "Error in a stored function called from
a SELECT doesn't cause ROLLBACK of statem".

The idea of the fix is to ensure that we always commit the current
statement at the end of dispatch_command(). In order to not issue
redundant disc syncs, an optimization of the two-phase commit
protocol is implemented to bypass the two phase commit if
the transaction is read-only.


mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  Update test results.
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  Update test results.
mysql-test/suite/rpl_ndb/t/disabled.def:
  Disable the tests, for which this changeset reveals a bug:
  the injector thread does not always add 'statement commit' to the
  rows injected in circular replication set up.
  To be investigated separately.
sql/ha_ndbcluster_binlog.cc:
  Add close_thread_tables() to run_query: this ensures
  that all tables are closed and there is no pending statement transaction.
sql/handler.cc:
  Implement optimisation of read-only transactions.
  If a transaction consists only of DML statements that do not change
  data, we do not perform a two-phase commit for it 
  (run one phase commit only).
sql/handler.h:
  Implement optimisation of read-only transactions.
  If a transaction consists only of DML statements that do not change
  data, we do not perform a two-phase commit for it 
  (run one phase commit only).
sql/log.cc:
  Mark the binlog transaction read-write whenever it's started.
  We never read from binlog, so it's safe and least intrusive to add
  this mark up here.
sql/log_event.cc:
  Update to the new layout of thd->transaction.
sql/rpl_injector.cc:
  Always commit statement transaction before committing the global one.
sql/sp.cc:
  Ad comments.
sql/sp_head.cc:
  Add comments.
sql/sql_base.cc:
  Commit transaction at the end of the statement. Always.
sql/sql_class.cc:
  Update thd_ha_data to return the right pointer in the new layout.
  
  Fix select_dumpvar::send_data to properly return operation status.
  A test case from commit.inc would lead to an assertion failure in the 
  diagnostics area (double assignment). Not test otherwise by the test suite.
sql/sql_class.h:
  Implement a new layout of storage engine transaction info in which 
  it is easy to access all members related to the handlerton only
  based on ht->slot.
sql/sql_cursor.cc:
  Update to the new layout of thd->transaction.
sql/sql_delete.cc:
  Remove wrong and now redundant calls to ha_autocommit_or_rollback.
  The transaction is committed in one place, at the end of the statement.
  Remove calls to mysql_unlock_tables, since some engines count locks
  and commit statement transaction in unlock_tables(), which essentially
  equates mysql_unlock_tables to ha_autocommit_or_rollback.
  Previously it was necessary to unlock tables soon because we wanted
  to avoid sending of 'ok' packet to the client under locked tables.
  This is no longer necessary, since OK packet is also sent from one place
  at the end of transaction.
sql/sql_do.cc:
  Add DO always clears the error, we must rollback the current
  statement before this happens. Otherwise the statement will be committed,
  and not rolled back in the end.
sql/sql_insert.cc:
  Remove wrong and now redundant calls to ha_autocommit_or_rollback.
  The transaction is committed in one place, at the end of the statement.
  Remove calls to mysql_unlock_tables, since some engines count locks
  and commit statement transaction in unlock_tables(), which essentially
  equates mysql_unlock_tables to ha_autocommit_or_rollback.
  Previously it was necessary to unlock tables soon because we wanted
  to avoid sending of 'ok' packet to the client under locked tables.
  This is no longer necessary, since OK packet is also sent from one place
  at the end of transaction.
sql/sql_load.cc:
  Remove wrong and now redundant calls to ha_autocommit_or_rollback.
  The transaction is committed in one place, at the end of the statement.
  Remove calls to mysql_unlock_tables, since some engines count locks
  and commit statement transaction in unlock_tables(), which essentially
  equates mysql_unlock_tables to ha_autocommit_or_rollback.
  Previously it was necessary to unlock tables soon because we wanted
  to avoid sending of 'ok' packet to the client under locked tables.
  This is no longer necessary, since OK packet is also sent from one place
  at the end of transaction.
sql/sql_parse.cc:
  Implement optimisation of read-only transactions: bypass 2-phase
  commit for them.
  Always commit statement transaction before commiting the global one.
  Fix an unrelated crash in check_table_access, when called from 
  information_schema.
sql/sql_partition.cc:
  Partitions commit at the end of a DDL operation.
  Make sure that send_ok() is done only if the commit has succeeded.
sql/sql_table.cc:
  Use ha_autocommit_or_rollback and end_active_trans everywhere.
  Add end_trans to mysql_admin_table, so that it leaves no pending
  transaction.
sql/sql_udf.cc:
  Remvove a redundant call to close_thread_tables()
sql/sql_update.cc:
  Remove wrong and now redundant calls to ha_autocommit_or_rollback.
  The transaction is committed in one place, at the end of the statement.
  Remove calls to mysql_unlock_tables, since some engines count locks
  and commit statement transaction in unlock_tables(), which essentially
  equates mysql_unlock_tables to ha_autocommit_or_rollback.
  Previously it was necessary to unlock tables soon because we wanted
  to avoid sending of 'ok' packet to the client under locked tables.
  This is no longer necessary, since OK packet is also sent from one place
  at the end of transaction.
mysql-test/include/commit.inc:
  New BitKeeper file ``mysql-test/include/commit.inc''
mysql-test/r/commit_1innodb.result:
  New BitKeeper file ``mysql-test/r/commit_1innodb.result''
mysql-test/t/commit_1innodb.test:
  New BitKeeper file ``mysql-test/t/commit_1innodb.test''
2008-02-19 14:43:01 +03:00
unknown
da1a6127d6 Merge quad.:/mnt/raid/alik/MySQL/devel/5.1
into  quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged


client/mysqlbinlog.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
2008-02-18 18:12:37 +03:00
unknown
622635b663 Merge quad.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged


client/mysqlbinlog.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
2008-02-18 18:12:05 +03:00
unknown
ea34b5e7aa Add a test case for Bug#21704: Renaming column does not update
FK definition.


mysql-test/r/innodb_mysql.result:
  Updated result file.
2008-02-15 14:14:09 +03:00
unknown
410e2d64d1 Adding waits to events_scheduling to prevent the test from
failing on heavily loaded systems.


mysql-test/t/events_scheduling.test:
  Adding waits before statements since the scheduler is unpredictable
  on loaded systems and might be delayed.
2008-02-15 10:24:13 +01:00
unknown
5704c7fe2c A patch for Bug#18834: ALTER TABLE ADD INDEX on table with
two timestamp fields.
  
The actual problem here was that CREATE TABLE allowed zero
date as a default value for a TIMESTAMP column in NO_ZERO_DATE mode.
  
The thing is that for TIMESTAMP date type specific rule is applied:
  column_name TIMESTAMP == column_name TIMESTAMP DEFAULT 0
whever for any other date data type
  column_name TYPE == column_name TYPE DEFAULT NULL
  
The fix is to raise an error when we're in NO_ZERO_DATE mode and
there is TIMESTAMP column w/o default value.


mysql-test/r/create.result:
  Update result file.
mysql-test/t/create.test:
  Test case for Bug#18834: ALTER TABLE ADD INDEX on table with
  two timestamp fields.
sql/sql_table.cc:
  Report an error if NO_ZERO_MODE is set and we have zero date
  as a default.
2008-02-14 18:13:40 +03:00
unknown
58a79add8a Fixing test rpl_events to not give false failures.
mysql-test/suite/rpl/r/rpl_events.result:
  Result change.
mysql-test/suite/rpl/t/rpl_events.test:
  Replacing table with varying contents with a fresh table to avoid
  test problems. The contents of the event is unimportant for this
  part of the test.
2008-02-14 10:53:12 +01:00
unknown
29169c6b47 Fixes to try to handle valgrind warnings identical to those in
BUG#24387, which is closed since long.


sql/mysqld.cc:
  Moving my_thread_end() to before pthread_cond_broadcast() since
  it might cause other threads to start using resources that are
  about to be released, or tries to proceed assuming that the
  resources have already been released.
2008-02-14 09:53:01 +01:00
unknown
0f19e844d8 Removing non-deterministic tests from events_scheduling test.
mysql-test/r/events_scheduling.result:
  Result change.
mysql-test/t/events_scheduling.test:
  Removing a test that only confirms that event scheduling is
  inexact, hence causing sporadic failures on loaded machines.
2008-02-13 12:41:54 +01:00
unknown
4a7d3293b7 The test rpl_row_charset and it dependent rpl_ndb_charset is
irrelevant to execute since the charset information does not
affect replication for row-based replication. The row-based
versions of the tests were removed, and the statement-based
version of the test was made executable by all three modes.

This involves removing any lines that causes the test to be
dependent on the contents of the binary log, and instead we
just check that the replication works as it should.


BitKeeper/deleted/.del-rpl_ndb_charset.test:
  Delete: mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test
BitKeeper/deleted/.del-rpl_ndb_charset.result:
  Delete: mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result
BitKeeper/deleted/.del-rpl_row_charset.test:
  Delete: mysql-test/extra/rpl_tests/rpl_row_charset.test
BitKeeper/deleted/.del-rpl_row_charset.test~739be9df1baaee3e:
  Delete: mysql-test/suite/rpl/t/rpl_row_charset.test
BitKeeper/deleted/.del-rpl_row_charset_innodb.test:
  Delete: mysql-test/suite/rpl/t/rpl_row_charset_innodb.test
BitKeeper/deleted/.del-rpl_row_charset_innodb-master.opt:
  Delete: mysql-test/suite/rpl/t/rpl_row_charset_innodb-master.opt
BitKeeper/deleted/.del-rpl_row_charset_innodb-slave.opt:
  Delete: mysql-test/suite/rpl/t/rpl_row_charset_innodb-slave.opt
BitKeeper/deleted/.del-rpl_row_charset_innodb.result:
  Delete: mysql-test/suite/rpl/r/rpl_row_charset_innodb.result
BitKeeper/deleted/.del-rpl_row_charset.result:
  Delete: mysql-test/suite/rpl/r/rpl_row_charset.result
mysql-test/extra/rpl_tests/rpl_charset.test:
  Test is not dependent on binlog format any more.
  Using --echo instead of "select" to print text.
  Removing lines causing the test to be dependent on binlog contents.
mysql-test/suite/rpl/r/rpl_charset.result:
  Result change.
mysql-test/suite/rpl/t/rpl_charset.test:
  Using renamed version of test file.
2008-02-13 11:37:06 +01:00
unknown
e40e60fe33 Additional patch for Bug#31222: com_% global status counters
behave randomly with mysql_change_user.

The test case had to be moved into not_embedded_server.test file,
because SHOW GLOBAL STATUS does not work properly in embedded
server (see bug 34517).


BitKeeper/deleted/.del-change_user-master.opt:
  Delete: mysql-test/t/change_user-master.opt
mysql-test/r/change_user.result:
  Move test case for Bug#31222 to not_embedded_server.test.
mysql-test/r/not_embedded_server.result:
  Move test case for Bug#31222 to not_embedded_server.test.
mysql-test/t/change_user.test:
  Move test case for Bug#31222 to not_embedded_server.test.
mysql-test/t/not_embedded_server.test:
  Move test case for Bug#31222 to not_embedded_server.test.
2008-02-13 13:00:24 +03:00
unknown
f8c40728ed Additional patch for Bug#32538. Fix result files of windows test cases.
mysql-test/r/named_pipe.result:
  Fix result file (windows-specific test).
mysql-test/r/shm.result:
  Fix result file (windows-specific test).
2008-02-13 12:02:16 +03:00
unknown
c1d0dd94bb Fix for Bug#32538: View definition picks up character set,
but not collation.

The problem here was that text literals in a view were always
dumped with character set introducer. That lead to loosing
collation information.

The fix is to dump character set introducer only if it was
in the original query. That is now possible because there 
is no problem any more of loss of character set of string
literals in views -- after WL#4052 the view is dumped 
in the original character set.


mysql-test/r/case.result:
  Update result file.
mysql-test/r/compress.result:
  Update result file.
mysql-test/r/ctype_collate.result:
  Update result file.
mysql-test/r/date_formats.result:
  Update result file.
mysql-test/r/ddl_i18n_koi8r.result:
  Update result file.
mysql-test/r/ddl_i18n_utf8.result:
  Update result file.
mysql-test/r/fulltext.result:
  Update result file.
mysql-test/r/func_crypt.result:
  Update result file.
mysql-test/r/func_encrypt.result:
  Update result file.
mysql-test/r/func_if.result:
  Update result file.
mysql-test/r/func_in.result:
  Update result file.
mysql-test/r/func_like.result:
  Update result file.
mysql-test/r/func_regexp.result:
  Update result file.
mysql-test/r/func_set.result:
  Update result file.
mysql-test/r/func_str.result:
  Update result file.
mysql-test/r/func_time.result:
  Update result file.
mysql-test/r/gis.result:
  Update result file.
mysql-test/r/group_min_max.result:
  Update result file.
mysql-test/r/mysqldump.result:
  Update result file.
mysql-test/r/negation_elimination.result:
  Update result file.
mysql-test/r/null.result:
  Update result file.
mysql-test/r/select.result:
  Update result file.
mysql-test/r/show_check.result:
  Update result file.
mysql-test/r/sp-code.result:
  Update result file.
mysql-test/r/ssl.result:
  Update result file.
mysql-test/r/ssl_compress.result:
  Update result file.
mysql-test/r/subselect.result:
  Update result file.
mysql-test/r/temp_table.result:
  Update result file.
mysql-test/r/type_blob.result:
  Update result file.
mysql-test/r/view.result:
  Update result file.
mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
  Update result file.
mysql-test/suite/rpl/r/rpl_get_lock.result:
  Update result file.
mysql-test/suite/rpl/r/rpl_master_pos_wait.result:
  Update result file.
mysql-test/t/view.test:
  Add a test case for Bug#32538.
sql/item.cc:
  Do not dump character set introducer if it was not specified
  explicitly in the original query.
sql/item.h:
  Add 'cs_specified' property to Item_string.
sql/sql_yacc.yy:
  Set Item_string::cs_specified property to TRUE
  when character set introducer is explicitly specified.
2008-02-12 22:09:16 +03:00