Commit graph

1098 commits

Author SHA1 Message Date
Sergey Glukhov
95b721e628 Bug#38918 selecting from information_schema.columns is disproportionately slow
The problem: table_open_method is not calculated properly if '*' is used in 'select'
The fix: added table_open_method calculation for such case


mysql-test/r/information_schema.result:
  test result
mysql-test/t/information_schema.test:
  test case
sql/sql_show.cc:
  The problem: table_open_method is not calculated properly if '*' is used in 'select'
  The fix: added table_open_method calculation for such case
2008-10-09 12:50:29 +05:00
Sergey Glukhov
4735aaea70 automerge 2008-10-02 15:08:15 +05:00
Sergey Glukhov
7e60f71001 Bug#22763 Disrepancy between SHOW CREATE VIEW and I_S.VIEWS
The problem:
I_S views table does not check the presence of SHOW_VIEW_ACL|SELECT_ACL
privileges for a view. It leads to discrepancy between SHOW CREATE VIEW
and I_S.VIEWS.
The fix:
added appropriate check.


mysql-test/r/information_schema_db.result:
  test result
mysql-test/t/information_schema_db.test:
  test case
sql/sql_show.cc:
  The problem:
  I_S views table does not check the presence of SHOW_VIEW_ACL|SELECT_ACL
  privileges for a view. It leads to discrepancy between SHOW CREATE VIEW
  and I_S.VIEWS.
  The fix:
  added appropriate check.
2008-10-02 14:37:07 +05:00
Timothy Smith
9eb2ebd4d1 Cherry-pick some changes from innodb-5.1-ss2545 snapshot. Includes fixes for
Bug#37531, Bug#36941, Bug#36941, Bug#36942, Bug#38185.

Also include test case from Bug 34300 which was left out from earlier snapshot
(5.1-ss2387).

Also include fix for Bug #29507, "TRUNCATE shows to many rows effected", since
the fix for Bug 37531 depends on it.
2008-08-20 16:18:33 -06:00
Chad MILLER
780fee586d Fix for bug#36399: Double free bug when INFORMATION_SCHEMA
plugin init function fails

Problem: if an INFORMATION_SCHEMA plugin initialization fails
we free some inner plugin's data (schema_table) twice during the 
INSTALL PLUGIN command.

Fix: free it once.
2008-08-18 12:15:56 -04:00
Chad MILLER
21598ea0e6 Bug#37301 Length and Max_length differ with no obvious reason(2nd version)
Length value is the length of the field,
Max_length is the length of the field value.
So Max_length can not be more than Length.
The fix: fixed calculation of the Item_empty_string item length

(Patch applied and queued on demand of Trudy/Davi.)

sql/item.h:
  fixed calculation of the item length
sql/sql_show.cc:
  removed unnecessary code
2008-08-15 16:13:27 -04:00
unknown
3703bbf623 Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
SHOW commands fail in embedded mode because schema_table array doesn't
correspond to enum_schema_tables.

This patch implements a dummy implementation of the abstract fill_table
function to be used when the event scheduler (or other core feature)
isn't part of the build.


libmysqld/lib_sql.cc:
  Fixed type conversion warning.
sql/sql_show.cc:
  Leave entry for EVENTS to keep array consistent but set the 
  fill_table function pointer to a dummy function instead.
2008-05-12 12:09:10 +02:00
unknown
3cf9e6eb6b Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
The event scheduler was not designed to work in embedded mode. This
patch disables and excludes the event scheduler when the server is
compiled for embedded build.


libmysqld/Makefile.am:
  Reduce the amount of event code in an embedded build.
mysql-test/t/events_trans.test:
  Disable test if run in embedded mode.
sql/Makefile.am:
  Introduce definition HAVE_EVENT_SCHEDULER and one new source file.
sql/event_data_objects.cc:
  Refactor Event_parse_data to new file.
sql/event_data_objects.h:
  Refactor Event_parse_data to new file.
  Move global definitions to new file.
sql/event_queue.cc:
  Move all parsed items to Event_parse_data for easier modularization.
sql/events.cc:
  Move all parsed items to Event_parse_data for easier modularization.
sql/mysqld.cc:
  Disable the event schedular subsystem if the server is compiled in
  embedded mode.
sql/set_var.cc:
  Disable the event schedular subsystem if the server is compiled in
  embedded mode.
sql/set_var.h:
  Disable the event schedular subsystem if the server is compiled in
  embedded mode.
sql/sql_db.cc:
  Disable the event schedular subsystem if the server is compiled in
  embedded mode.
sql/sql_parse.cc:
  Disable the event schedular subsystem if the server is compiled in
  embedded mode.
sql/sql_show.cc:
  Disable the event schedular subsystem if the server is compiled in
  embedded mode.
sql/sql_test.cc:
  Disable the event schedular subsystem if the server is compiled in
  embedded mode.
sql/sql_yacc.yy:
  Only include event-code needed for parsing to reduce impact on embedded
  build.
  Move all constants to Event_parse_data class.
mysql-test/r/events_embedded.result:
  Add test case to make sure the 'event_scheduler' can't be activated
  in embedded mode.
mysql-test/r/is_embedded.require:
  Add test case to make sure the 'event_scheduler' can't be activated
  in embedded mode.
mysql-test/t/events_embedded.test:
  Add test case to make sure the 'event_scheduler' can't be activated
  in embedded mode.
sql/event_parse_data.cc:
  New file. Extracted Event_parse data into a new file.
sql/event_parse_data.h:
  New file. Extracted Event_parse data into a new file.
2008-05-09 09:43:02 +02:00
unknown
01a979e8b2 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel


client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
include/config-win.h:
  Manual merge between main 5.1 and 5.1 marvel.
mysql-test/r/change_user.result:
  Manual merge between main 5.1 and 5.1 marvel.
mysql-test/t/change_user.test:
  Manual merge between main 5.1 and 5.1 marvel.
sql/sql_plugin.cc:
  Manual merge between main 5.1 and 5.1 marvel.
2008-03-28 12:14:27 +02:00
unknown
a451de2f59 Merge host.loc:/home/uchum/work/mysql-5.1
into  host.loc:/home/uchum/work/5.1-opt


client/mysqltest.c:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2008-03-27 15:54:45 +04:00
unknown
f1bb7c2019 Merge host.loc:/home/uchum/work/5.0-opt
into  host.loc:/home/uchum/work/5.1-opt


sql/sql_show.cc:
  Auto merged
mysql-test/r/information_schema.result:
  Merge with 5.0-opt.
mysql-test/t/information_schema.test:
  Merge with 5.0-opt.
2008-03-25 19:49:27 +04:00
unknown
3c5894baaa Bug#34529: Crash on complex Falcon I_S select after ALTER .. PARTITION BY
When swapping out heap I_S tables to disk, this is done after plan refinement.
Thus, READ_RECORD::file will still point to the (deleted) heap handler at start
of execution. This causes segmentation fault if join buffering is used and the 
query is a star query where the result is found to be empty before accessing
some table. In this case that table has not been initialized (i.e. had its 
READ_RECORD re-initialized) before the cleanup routine tries to close the handler.
Fixed by updating READ_RECORD::file when changing handler.


mysql-test/r/information_schema.result:
  Bug#34529: Test result.
mysql-test/t/information_schema.test:
  Bug#34529: Test case.
sql/sql_show.cc:
  Bug#34529: The fix.
2008-03-19 14:32:28 +01:00
unknown
e79249f81b Manual merge
configure.in:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/partition.result:
  Auto merged
mysql-test/r/partition_symlink.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/partition_info.cc:
  Auto merged
sql/partition_info.h:
  Auto merged
sql/rpl_rli.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_parse.cc:
  Manual merge. Needs later fix. New code in create table was not
  accepted. Needs to be added to mysql_create_table_no_lock().
2008-03-14 12:02:11 +01:00
unknown
45b4d937c6 Bug#35108 SELECT FROM REFERENTIAL_CONSTRAINTS crashes
referenced_key_name field can be uninitialized in the case when
referenced table is dropped.
Added codition which allows to handle this situation.


mysql-test/r/information_schema_inno.result:
  test result
mysql-test/t/information_schema_inno.test:
  test result
sql/sql_show.cc:
  referenced_key_name field can be uninitialized in the case when
  referenced table is dropped.
  Added codition which allows to handle this situation.
2008-03-14 14:12:39 +04:00
unknown
6ef32fd0a9 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel


client/mysqldump.c:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysys/my_create.c:
  SCCS merged
2008-03-13 23:35:52 +02:00
unknown
6c2f9bf5e1 Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.1-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt


sql/sql_show.cc:
  Auto merged
sql/table.h:
  Auto merged
2008-03-12 13:56:50 +03:00
unknown
7b5da0aa77 Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines
into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.1


configure.in:
  Auto merged
include/mysql/plugin.h:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/partition_innodb.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/partition_innodb.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
2008-03-07 13:46:29 -08:00
unknown
44df0f6e9c BUG#34656 - KILL a query = Assertion failed: m_status == DA_ERROR ||
m_status == DA_OK

Reading from information_scema.tables or information_schema.columns
may cause assertion failure in debug builds. This may happen under
rare circumstances when information_schema fails to get information
about a table (e.g. when a connection is killed).

This happens because open_normal_and_derived_tables() can return an
error without setting an error message in THD. But information_schema
attempts to get an error message from THD unconditionally.

With this fix information_schema attempts to get an error message
from THD only in case error message is set in THD.


mysql-test/r/information_schema.result:
  A test case for BUG#34656.
mysql-test/t/information_schema.test:
  A test case for BUG#34656.
sql/item_func.cc:
  Set proc info to "User sleep".
sql/sql_show.cc:
  open_normal_and_derived_tables() can return an error without
  setting an error message in THD. That means we must access
  error message conditionally, only in case thd->is_error() is
  true.
2008-03-07 18:41:50 +04:00
unknown
4aae2099c9 Bug #34367: sql/sql_show.cc: create_schema_table should handle
MYSQL_TYPE_NEWDECIMAL

Added support for the type MYSQL_TYPE_NEWDECIMAL. It now works like
MYSQL_TYPE_DECIMAL. Unfortunately there cannot be a test case until
we have a working information_schema plugin as part of the source
distribution.


sql/sql_show.cc:
  Bug#34367: The fix. Corrected wrong comments and a DBUG_ENTER with wrong 
  function name.
sql/table.h:
  Bug#34367: Added comments to st_field_info.
2008-03-07 13:56:15 +01:00
unknown
abf0761539 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel


client/mysqltest.c:
  Auto merged
mysql-test/r/change_user.result:
  Auto merged
mysql-test/t/change_user.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_test.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
2008-03-07 11:25:47 +02: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
9060b50f14 Rename send_eof() to my_eof() for consistency with my_ok() and my_error() 2008-02-19 15:58:08 +03:00
unknown
07c407cbdf Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel


client/mysqlcheck.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_sys.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
2008-02-12 10:45:08 +01:00
unknown
58753e5c11 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel


BitKeeper/etc/ignore:
  auto-union
client/mysqlcheck.c:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/Makefile.am:
  Auto merged
include/m_string.h:
  Auto merged
include/my_base.h:
  Auto merged
include/my_dbug.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysys/mf_keycache.c:
  Auto merged
sql/gen_lex_hash.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/lex.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ft_nlq_search.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
client/mysqlslap.c:
  Manual merge with main 5.1 tree.
2008-02-08 12:13:33 +01:00
unknown
d639cdc39c Merge quad.:/mnt/raid/alik/MySQL/devel/5.1
into  quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged


client/mysqlcheck.c:
  Auto merged
configure.in:
  Auto merged
extra/resolveip.c:
  Auto merged
include/my_sys.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/mysqlcheck.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/mysqlcheck.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
storage/innobase/buf/buf0buf.c:
  Auto merged
storage/innobase/buf/buf0flu.c:
  Auto merged
storage/innobase/buf/buf0lru.c:
  Auto merged
storage/innobase/include/buf0buf.h:
  Auto merged
storage/innobase/include/buf0buf.ic:
  Auto merged
storage/innobase/include/sync0arr.h:
  Auto merged
storage/innobase/include/sync0rw.h:
  Auto merged
storage/innobase/include/sync0rw.ic:
  Auto merged
storage/innobase/include/sync0sync.h:
  Auto merged
storage/innobase/os/os0sync.c:
  Auto merged
storage/innobase/sync/sync0arr.c:
  Auto merged
storage/innobase/sync/sync0rw.c:
  Auto merged
storage/innobase/sync/sync0sync.c:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/sort.c:
  Auto merged
sql/sql_parse.cc:
  Manual merge.
2008-02-01 13:55:39 +03:00
unknown
96f3393777 Fix a build failure (embedded server). 2008-01-30 23:04:55 +03:00
unknown
39509d64c3 A fix and a test case for Bug#34166 Server crash in SHOW OPEN TABLES and
pre-locking.

The crash was caused by an implicit assumption in check_table_access() that
table_list parameter is always a part of lex->query_tables.

When iterating over the passed list of tables, check_table_access() used
to stop only when lex->query_tables_last_not_own was reached. 
In case of pre-locking, lex->query_tables_last_own is not NULL and points
to some element of lex->query_tables. When the parameter
of check_table_access() was not part of lex->query_tables, loop invariant
could never be violated and a crash would happen when the current table
pointer would point beyond the end of the provided list.

The fix is to change the signature of check_table_access() to also accept
a numeric limit of loop iterations, similarly to check_grant(), and 
supply this limit in all places when we want to check access of tables
that are outside lex->query_tables, or just want to check access to one table.


mysql-test/r/information_schema.result:
  Update test results (Bug#34166).
mysql-test/t/information_schema.test:
  Add a test case for Bug#34166.
sql/mysql_priv.h:
  Change signature of check_table_access() to accept a numeric limit
  of tables to check.
sql/sp_head.cc:
  Update to the new signature of check_table_access().
sql/sql_acl.cc:
  Improve code clarity: if there is a numeric limit, we should not need
  to look at first_not_own_table.
sql/sql_base.cc:
  Update to the new signature of check_table_access().
sql/sql_cache.cc:
  Update to the new signature of check_table_access().
sql/sql_parse.cc:
  Update to the new signature of check_table_access().
  Change check_table_access() to accept an optional numeric limit of tables
  to check. A crash would happen when check_table_access() was
  passed a list of tables that is not part of lex->query_tables and
  lex->query_tables_last_own was not NULL.
sql/sql_plugin.cc:
  Update to the new signature of check_table_access().
sql/sql_prepare.cc:
  Update to the new signature of check_table_access().
sql/sql_show.cc:
  Update to the new signature of check_table_access().
  Ensure that check_table_access() only checks access to the first
  table in the table list when called from list_open_tables().
  list_open_tables() supplies a table list that is created on stack,
  whereas check_table_access() used to assume that the supplied list is a part
  of thd->lex.
sql/sql_trigger.cc:
  Update to the new signature of check_table_access().
sql/sql_view.cc:
  Update to the new signature of check_table_access().
2008-01-30 18:27:41 +03:00
unknown
bf541d14f2 Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51


client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
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_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.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_yacc.yy:
  Auto merged
sql/handler.cc:
  Manual merge
sql/item.cc:
  Manual merge
2008-01-25 10:37:29 -07:00
unknown
295732b580 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1


configure.in:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_geofunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/key.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/protocol.h:
  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_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  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_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
storage/archive/ha_archive.cc:
  Auto merged
storage/innobase/buf/buf0buf.c:
  Auto merged
storage/innobase/buf/buf0flu.c:
  Auto merged
storage/innobase/buf/buf0lru.c:
  Auto merged
storage/innobase/include/buf0buf.h:
  Auto merged
storage/innobase/include/buf0buf.ic:
  Auto merged
storage/innobase/include/sync0arr.h:
  Auto merged
storage/innobase/include/sync0rw.h:
  Auto merged
storage/innobase/include/sync0rw.ic:
  Auto merged
storage/innobase/include/sync0sync.h:
  Auto merged
storage/innobase/os/os0sync.c:
  Auto merged
storage/innobase/sync/sync0arr.c:
  Auto merged
storage/innobase/sync/sync0rw.c:
  Auto merged
storage/innobase/sync/sync0sync.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  merged
sql/item_cmpfunc.cc:
  merged
sql/protocol.cc:
  merged
sql/slave.cc:
  merged
sql/sql_class.h:
  merged
sql/sql_parse.cc:
  merged
2007-12-20 22:11:37 +01:00
unknown
0fbc29c197 A pre-requisite for the fix for Bug#12713 "Error in a stored function
called from a SELECT doesn't cause ROLLBACK of state"
Make private all class handler methods (PSEA API) that may modify
data. Introduce and deploy public ha_* wrappers for these methods in 
all sql/.
This necessary to keep track of all data modifications in sql/,
which is in turn necessary to be able to optimize two-phase
commit of those transactions that do not modify data.


sql/ha_partition.cc:
  Class ha_partition is no longer a friend of class handler.
  Use the public handler interface (handler::ha_ methods) for partition
  operations.
  Remove unnecessary casts from char[] to const char *.ppзи выафвыаafa
sql/handler.cc:
  Function ha_create_table() is no longer a friend of class handler.
  Use public handler::change_table_ptr() to access private members.
  This fixes a subtle bug (no test case in the test suite) when a
  deletion error occurs inside one partition of a partitioned engine. 
  The old code would crash in handler::print_error() in this case.
  
  Implement the newly introduced public ha_* wrappers of the private
  virtual handler methods.
sql/handler.h:
  Introduce ha_* wrappers to all class handler methods that may
  modify data. This is necessary to be able to keep track of
  data modifying operations of class handler and optimize read-only
  transactions.
sql/item_sum.cc:
  delete_all_rows -> ha_delete_all_rows
sql/sql_base.cc:
  Use the new public wrappers.
sql/sql_delete.cc:
  delete_all_rows -> ha_delete_all_rows
sql/sql_partition.cc:
  Use the new public wrappers.
sql/sql_select.cc:
  delete_all_rows -> ha_delete_all_rows
  delete_table -> ha_delete_table
  disabe_indexes -> ha_disable_idnexes
sql/sql_show.cc:
  delete_all_rows -> ha_delete_all_rows
sql/sql_table.cc:
  Use the public wrappers for class handler DDL methods.
  All methods which may change handler data are now accessed via a public
  wrapper.
sql/sql_union.cc:
  delete_all_rows -> ha_delete_all_rows
  {enable,disable}_indexes -> ha_{enable,disable}_indexes
sql/sql_update.cc:
  bulk_update_row -> ha_bulk_update_row
sql/unireg.cc:
  create_handler_files -> ha_create_handler_files
2007-12-20 21:16:55 +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
2a0d2fef51 Bug#12713 "Error in a stored function called from a SELECT doesn't
cause ROLLBACK of statement", part 1. Review fixes.

Do not send OK/EOF packets to the client until we reached the end of 
the current statement.
This is a consolidation, to keep the functionality that is shared by all 
SQL statements in one place in the server.
Currently this functionality includes:
- close_thread_tables()
- log_slow_statement().

After this patch and the subsequent patch for Bug#12713, it shall also include:
- ha_autocommit_or_rollback()
- net_end_statement()
- query_cache_end_of_result().

In future it may also include:
- mysql_reset_thd_for_next_command().


include/mysql_com.h:
  Rename now unused members of NET: no_send_ok, no_send_error, report_error.
  These were server-specific variables related to the client/server
  protocol. They have been made obsolete by this patch.
  
  Previously the same members of NET were used to store the error message
  both on the client and on the server. 
  The error message was stored in net.last_error (client: mysql->net.last_error,
  server: thd->net.last_error).
  The error code was stored in net.last_errno (client: mysql->net.last_errno,
  server: thd->net.last_errno).
  The server error code and message are now stored elsewhere 
  (in the Diagnostics_area), thus NET members are no longer used by the
  server.
  Rename last_error to client_last_error, last_errno to client_last_errno
  to avoid potential bugs introduced by merges.
include/mysql_h.ic:
  Update the ABI file to reflect a rename. 
  Renames do not break the binary compatibility.
libmysql/libmysql.c:
  Rename last_error to client_last_error, last_errno to client_last_errno.
  This is necessary to ensure no unnoticed bugs introduced by merged
  changesets.
  
  Remove net.report_error, net.no_send_ok, net.no_send_error.
libmysql/manager.c:
  Rename net.last_errno to net.client_last_errno.
libmysqld/lib_sql.cc:
  Rename net.last_errno to net.client_last_errno.
  
  Update the embedded implementation of the client-server protocol to
  reflect the refactoring of protocol.cc.
libmysqld/libmysqld.c:
  Rename net.last_errno to net.client_last_errno.
mysql-test/r/events.result:
  Update to reflect the change in mysql_rm_db(). Now we drop stored
  routines and events for a given database name only if there
  is a directory for this database name. ha_drop_database() and
  query_cache_invalidate() are called likewise. 
  Previously we would attempt to drop routines/events even if database
  directory was not found (it worked, since routines and events are stored
  in tables). This fixes Bug 29958 "Weird message on DROP DATABASE if mysql.proc
  does not exist".
  The change was done because the previous code used to call send_ok()
  twice, which led to an assertion failure when asserts against it were
  added by this patch.
mysql-test/r/grant.result:
  Fix the patch for Bug 16470, now FLUSH PRIVILEGES produces an error 
  if mysql.procs_priv is missing.
  This fixes the assert that send_ok() must not called after send_error()
  (the original patch for Bug 16470 was prone to this).
mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result:
  Produce a more detailed error message.
mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result:
  Produce a more detailed error message.
mysql-test/t/grant.test:
  Update the test, now FLUSH PRIVILEGES returns an error if mysql.procs_priv
  is missing.
server-tools/instance-manager/mysql_connection.cc:
  Rename net.last_errno to net.client_last_errno.
sql/ha_ndbcluster_binlog.cc:
  Add asserts. 
  
  Use getters to access statement status information.
  
  Add a comment why run_query() is broken. Reset the diagnostics area
  in the end of run_query() to fulfill the invariant that the diagnostics_area
  is never assigned twice per statement (see the comment in the code
  when this can happen). We still do not clear thd->is_fatal_error and
  thd->is_slave_error, which may lead to bugs, I consider the whole affair
  as something to be dealt with separately.
sql/ha_partition.cc:
  fatal_error() doesn't set an error by itself. Perhaps we should
  remove this method altogether and instead add a flag to my_error 
  to set thd->is_fatal_error property.
  
  Meanwhile, this change is a part of inspection made to the entire source
  code with the goal to ensure that fatal_error()
  is always accompanied by my_error().
sql/item_func.cc:
  There is no net.last_error anymore. Remove the obsolete assignment.
sql/log_event.cc:
  Use getters to access statement error status information.
sql/log_event_old.cc:
  Use getters to access statement error status information.
sql/mysqld.cc:
  Previously, if a continue handler for an error was found, my_message_sql() 
  would not set an error in THD. Since the current statement
  must be aborted in any case, find_handler() had a hack to assign 
  thd->net.report_error to 1.
  
  Remove this hack. Set an error in my_message_sql() even if the continue
  handler is found. The error will be cleared anyway when the handler
  is executed. This is one action among many in this patch to ensure the 
  invariant that whenever thd->is_error() is TRUE, we have a message in 
  thd->main_da.message().
sql/net_serv.cc:
  Use a full-blown my_error() in net_serv.cc to report an error,
  instead of just setting net->last_errno. This ensures the invariant that
  whenever thd->is_error() returns TRUE, we have a message in 
  thd->main_da.message().
  
  Remove initialization of removed NET members.
sql/opt_range.cc:
  Use my_error() instead of just raising thd->net.report_error. 
  This ensures the invariant that whenever thd->is_error() returns TRUE, 
  there is a message in thd->main_da.message().
sql/opt_sum.cc:
  Move invocation of fatal_error() right next to the place where
  we set the error message. That makes it easier to track that whenever
  fatal_error() is called, there is a message in THD.
sql/protocol.cc:
  Rename send_ok() and send_eof() to net_send_ok() and net_send_eof() 
  respectively. These functions write directly to the network and are not 
  for use anywhere outside the client/server protocol code. 
  
  Remove the code that was responsible for cases when either there is 
  no error code, or no error message, or both.
  Instead the calling code ensures that they are always present. Asserts
  are added to enforce the invariant.
  
  Instead of a direct access to thd->server_status and thd->total_warn_count
  use function parameters, since these from now on don't always come directly
  from THD.
  
  Introduce net_end_statement(), the single-entry-point replacement API for 
  send_ok(), send_eof() and net_send_error().
  
  Implement Protocol::end_partial_result_set to use in select_send::abort()
  when there is a continue handler.
sql/protocol.h:
  Update declarations.
sql/repl_failsafe.cc:
  Use getters to access statement status information in THD.
  Rename net.last_error to net.client_last_error.
sql/rpl_record.cc:
  Set an error message in prepare_record() if there is no default
  value for the field -- later we do print this message to the client.
sql/rpl_rli.cc:
  Use getters to access statement status information in THD.
sql/slave.cc:
  In create_table_from_dump() (a common function that is used in 
  LOAD MASTER TABLE SQL statement and COM_LOAD_MASTER_DATA), instead of hacks
  with no_send_ok, clear the diagnostics area when mysql_rm_table() succeeded.
  
  Update has_temporary_error() to work correctly when no error is set.
  This is the case when Incident_log_event is executed: it always returns
  an error but does not set an error message.
  
  Use getters to access error status information.
sql/sp_head.cc:
  Instead of hacks with no_send_error, work through the diagnostics area 
  interface to suppress sending of OK/ERROR packets to the client.
  
  Move query_cache_end_of_result before log_slow_statement(), similarly
  to how it's done in dispatch_command().
sql/sp_rcontext.cc:
  Remove hacks with assignment of thd->net.report_error, they are not
  necessary any more (see the changes in mysqld.cc).
sql/sql_acl.cc:
  Use getters to access error status information in THD.
sql/sql_base.cc:
  Access thd->main_da.sql_errno() only if there is an error. This fixes
  a bug when auto-discovery, that was effectively disabled under pre-locking.
sql/sql_binlog.cc:
  Remove hacks with no_send_ok/no_send_error, they are not necessary 
  anymore: the caller is responsible for network communication.
sql/sql_cache.cc:
  Disable sending of OK/ERROR/EOF packet in the end of dispatch_command
  if the response has been served from the query cache. This raises the 
  question whether we should store EOF packet in the query cache at all,
  or generate it anew for each statement (we should generate it anew), but
  this is to be addressed separately.
sql/sql_class.cc:
  Implement class Diagnostics_area. Please see comments in sql_class.h
  for details.
  
  Fix a subtle coding mistake in select_send::send_data: when on slave, 
  an error in Item::send() was ignored.
  The problem became visible due to asserts that the diagnostics area is
  never double assigned.
  
  Remove initialization of removed NET members.
  
  In select_send::abort() do not call select_send::send_eof(). This is
  not inheritance-safe. Even if a stored procedure continue handler is
  found, the current statement is aborted, not succeeded.
  Instead introduce a Protocol API to send the required response, 
  Protocol::end_partial_result_set().
  
  This simplifies implementation of select_send::send_eof(). No need
  to add more asserts that there is no error, there is an assert inside
  Diagnostics_area::set_ok_status() already.
  
  Leave no trace of no_send_* in the code.
sql/sql_class.h:
  Declare class Diagnostics_area. 
  
  Remove the hack with no_send_ok from
  Substatement_state.
  
  Provide inline implementations of send_ok/send_eof.
  
  Add commetns.
sql/sql_connect.cc:
  Remove hacks with no_send_error. 
  
  Since now an error in THD is always set if net->error, it's not necessary
  to check both net->error and thd->is_error() in the do_command loop.
  
  Use thd->main_da.message() instead of net->last_errno.
  
  Remove the hack with is_slave_error in sys_init_connect. Since now we do not
  reset the diagnostics area in net_send_error (it's reset at the beginning
  of the next statement), we can access it safely even after 
  execute_init_command.
sql/sql_db.cc:
  Update the code to satisfy the invariant that the diagnostics area is never
  assigned twice.
  Incidentally, this fixes Bug 29958 "Weird message on DROP DATABASE if 
  mysql.proc does not exist".
sql/sql_delete.cc:
  Change multi-delete to abort in abort(), as per select_send protocol.
  Fixes the merge error with the test for Bug 29136
sql/sql_derived.cc:
  Use getters to access error information.
sql/sql_insert.cc:
  Use getters to access error information.
sql-common/client.c:
  Rename last_error to client_last_error, last_errno to client_last_errno.
sql/sql_parse.cc:
  Remove hacks with no_send_error. Deploy net_end_statement().
  
  The story of COM_SHUTDOWN is interesting. Long story short, the server 
  would become on its death's door, and only no_send_ok/no_send_error assigned
  by send_ok()/net_send_error() would hide its babbling from the client.
  
  First of all, COM_QUIT does not require a response. So, the comment saying
  "Let's send a response to possible COM_QUIT" is not only groundless 
  (even mysqladmin shutdown/mysql_shutdown() doesn't send COM_QUIT after 
  COM_SHUTDOWN), it's plainly incorrect.
  
  Secondly, besides this additional 'OK' packet to respond to a hypothetical
  COM_QUIT, there was the following code in dispatch_command():
  
  if (thd->killed)
    thd->send_kill_message();
  if (thd->is_error()
    net_send_error(thd);
  
  This worked out really funny for the thread through which COM_SHUTDOWN
  was delivered: we would get COM_SHUTDOWN, say okay, say okay again, 
  kill everybody, get the kill signal ourselves, and then attempt to say 
  "Server shutdown in progress" to the client that is very likely long gone.
  
  This all became visible when asserts were added that the Diagnostics_area
  is not assigned twice.
  
  Move query_cache_end_of_result() to the end of dispatch_command(), since
  net_send_eof() has been moved there. This is safe, query_cache_end_of_result()
  is a no-op if there is no started query in the cache.
  
  Consistently use select_send interface to call abort() or send_eof()
  depending on the operation result.
  
  Remove thd->fatal_error() from reset_master(), it was a no-op. 
  in hacks with no_send_error woudl save us
  from complete breakage of the client/server protocol.
  
  Consistently use select_send::abort() whenever there is an error, 
  and select_send::send_eof() in case of success.
  The issue became visible due to added asserts.
sql/sql_partition.cc:
  Always set an error in THD whenever there is a call to fatal_error().
sql/sql_prepare.cc:
  Deploy class Diagnostics_area.
  Remove the unnecessary juggling with the protocol in 
  Select_fetch_protocol_binary::send_eof(). EOF packet format is 
  protocol-independent.
sql/sql_select.cc:
  Call fatal_error() directly in opt_sum_query.
  Call my_error() whenever we call thd->fatal_error().
sql/sql_servers.cc:
  Use getters to access error information in THD.
sql/sql_show.cc:
  Use getters to access error information in THD.
  
  Add comments.
  
  Call my_error() whenever we call fatal_error().
sql/sql_table.cc:
  Replace hacks with no_send_ok with the interface of the diagnostics area.
  
  Clear the error if ENOENT error in ha_delete_table().
sql/sql_update.cc:
  Introduce multi_update::abort(), which is the proper way to abort a
  multi-update. This fixes the merge conflict between this patch and
  the patch for Bug 29136.
sql/table.cc:
  Use a getter to access error information in THD.
sql/tztime.cc:
  Use a getter to access error information in THD.
2007-12-12 18:21:01 +03:00
unknown
ee52ff0ad9 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel


mysql-test/lib/mtr_report.pl:
  Auto merged
mysys/my_delete.c:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisam/mi_packrec.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
include/my_base.h:
  Manual merge from 5.1
2007-12-07 22:27:48 +02:00
unknown
7a57359762 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel


BitKeeper/etc/ignore:
  auto-union
client/mysqldump.c:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
2007-11-26 11:27:01 +02:00
unknown
692f0e4f67 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge


client/mysql.cc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/mysql.result:
  Auto merged
mysql-test/suite/ndb/r/ndb_dd_basic.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_extraCol_innodb.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_extraCol_myisam.result:
  Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
  Auto merged
mysql-test/t/ctype_uca.test:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/innodb.result:
  Manual merge.
2007-11-21 21:15:33 +01:00
unknown
8021e495cf Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  moonbone.local:/work/30081-bug-5.1-opt-mysql


client/mysql.cc:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/log_tables.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/sql_show.cc:
  Auto merged
2007-11-13 13:29:42 +00:00
unknown
b1b1d62776 Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
command and reported to a client.

The fact that a timestamp field will be set to NO on UPDATE wasn't shown 
by the SHOW COMMAND and reported to a client through connectors. This led to
problems in the ODBC connector and might lead to a user confusion.

A new filed flag called ON_UPDATE_NOW_FLAG is added. 
Constructors of the Field_timestamp set it when a field should be set to NOW
on UPDATE.

The get_schema_column_record function now reports whether a timestamp field
will be set to NOW on UPDATE.


mysql-test/t/information_schema.test:
  A test case adjusted after fixing the bug#30081.
mysql-test/r/type_timestamp.result:
  Adjusted a test case after fixing bug#30081.
mysql-test/r/type_ranges.result:
  Adjusted a test case after fixing bug#30081.
mysql-test/r/show_check.result:
  Adjusted a test case after fixing bug#30081.
mysql-test/r/ps_5merge.result:
  Adjusted a test case after fixing bug#30081.
mysql-test/r/ps_4heap.result:
  Adjusted a test case after fixing bug#30081.
mysql-test/r/ps_3innodb.result:
  Adjusted a test case after fixing bug#30081.
mysql-test/r/ps_2myisam.result:
  Adjusted a test case after fixing bug#30081.
mysql-test/r/metadata.result:
  Adjusted a test case after fixing bug#30081.
mysql-test/r/log_tables.result:
  Adjusted a test case after fixing bug#30081.
mysql-test/r/information_schema.result:
  A test case adjusted after fixing the bug#30081.
mysql-test/r/grant.result:
  Adjusted a test case after fixing bug#30081.
tests/mysql_client_test.c:
  A test case adjusted after fixing the bug#30081.
sql/sql_show.cc:
  Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
  command and reported to a client.
  The get_schema_column_record function now reports whether a timestamp field
  will be set to NOW on UPDATE.
sql/field.cc:
  Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
  command and reported to a client.
  Constructors of the Field_timestamp set the ON_UPDATE_NOW_FLAG on a field when
  it should be set to NOW on UPDATE.
include/mysql_com.h:
  Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
  command and reported to a client.
  A new filed flag called ON_UPDATE_NOW_FLAG  is added.
client/mysql.cc:
  Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
  command and reported to a client.
  The fieldflag2str function is adjusted to print the ON_UPDATE_NOW_FLAG.
2007-11-13 13:24:48 +00:00
unknown
69aee07373 Rewrite profiler code to be easier to maintain and less buggy.
Between 5.0 and 5.1, the step of incrementing the global query id
changed, which broke how the profiler noticed when a new query had
started.  That reset the state list and caused all but the last 
five (or so) states to be thrown away.

Now, don't watch for query_id changes in the lower level.

Add a bogus state change at the end of profiling so that the last 
real state change is timed.

Emit source reference for the start of the span of time instead of
the end of it.


mysql-test/r/profiling.result:
  Add a test that shows continuation of execution with multi-statement
  packets.
mysql-test/t/profiling.test:
  Add a test that shows continuation of execution with multi-statement
  packets.
sql/sql_parse.cc:
  Insert profiling calls at beginnings and ends of each query.
  
  Remove the old way of keeping or discarding profiles, and flipping 
  to new query profiles.
sql/sql_profile.cc:
  No longer use the thread's query_id to determine when we flip
  to a new statement.
  
  Some status statements are set to be NULL in the server.  We don't
  log those, as it doesn't fit this style of profiling yet.
  
  Rewrite the parser code to be more active and legible.  
  
  Relying on passive/lazy discovery of new queries was buggy.
  
  Add a bogus status change before ending a profile, so that the 
  previous real status has a endpoint.
  
  Emit source reference of the start of the span-of-time instead of
  the end of it.
sql/sql_profile.h:
  Store the server_query_id at instantiation time for a new query.
  
  Rewrite the parser code to be more active.  Relying on passive/lazy
  discovery of new queries was buggy.
  
  Name first state to more honestly describe the state.  We don't 
  really know of initialization that will follow.
sql/sql_show.cc:
  Update comment to note the decidedly weird field_length behavior
  on Decimal types in information_schema.
2007-11-09 14:45:44 -05:00
unknown
0eec2d63d5 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel


BitKeeper/etc/ignore:
  auto-union
client/mysql_upgrade.c:
  Auto merged
client/mysqlcheck.c:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqlimport.c:
  Auto merged
client/mysqlshow.c:
  Auto merged
client/mysqlslap.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
mysys/mf_keycache.c:
  Auto merged
mysys/my_init.c:
  Auto merged
mysys/safemalloc.c:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
sql/sql_yacc.yy:
  Merged with 5.1 main tree.
2007-11-08 13:23:08 +02:00
unknown
b01c89ed8c Fix several merge problems. There are many changes in 5.1 from 5.0
that affect profiling.


mysql-test/r/information_schema.result:
  Merge fixed.  This result moved to a new file.
sql/sql_parse.cc:
  Include profiling in statistics.
  
  Add hook for SHOW_PROFILE in execution.
sql/sql_profile.cc:
  Move/add the FEATURE_DISABLED warning to the I_S filling func.
  
  Fix merge, where a new member was added to ST_FIELD_INFO.
  
  orig_sql_command method was removed from Lex structure.
sql/sql_show.cc:
  Fix merge problem.
sql/sql_yacc.yy:
  orig_sql_command member removed from Lex structure in 5.1 .
2007-11-02 11:41:58 -04:00
unknown
124af3f873 Bug #31866: MySQL Server crashes on SHOW CREATE TRIGGER statement
SHOW CREATE TRIGGER was not checking for detected errors 
opening/reading the trigger file. 
Fixed to return the already generated error.


mysql-test/r/trigger.result:
  Bug #31866: test case
mysql-test/t/trigger.test:
  Bug #31866: test case
sql/sql_show.cc:
  Bug #31866: test for error and return it.
2007-11-01 14:42:14 +02:00
unknown
cca4ea275b Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1


CMakeLists.txt:
  Auto merged
BitKeeper/deleted/.del-Makefile.am~2:
  Auto merged
BitKeeper/deleted/.del-README~1:
  Auto merged
BitKeeper/deleted/.del-configure.js:
  Auto merged
BitKeeper/deleted/.del-ha_berkeley.cc:
  Auto merged
BitKeeper/triggers/post-commit:
  Auto merged
client/CMakeLists.txt:
  Auto merged
extra/CMakeLists.txt:
  Auto merged
include/config-win.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/r/func_in.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
server-tools/instance-manager/CMakeLists.txt:
  Auto merged
sql/CMakeLists.txt:
  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/lex.h:
  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/slave.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_lex.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.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/structs.h:
  Auto merged
storage/archive/ha_archive.cc:
  Auto merged
storage/myisam/CMakeLists.txt:
  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/ndbapi/DictCache.cpp:
  Auto merged
BitKeeper/deleted/.del-mysqld.vcproj~6aa7b3f9c3e28fcb:
  Manual merge.
configure.in:
  Manual merge.
mysql-test/r/information_schema.result:
  Manual merge.
mysql-test/t/profiling.test:
  Manual merge.
sql/set_var.cc:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
sql/sql_profile.cc:
  Manual merge.
sql/sql_profile.h:
  Manual merge.
sql/sql_select.cc:
  Manual merge.
sql/sql_show.cc:
  Manual merge.
sql/table.h:
  Manual merge.
storage/ndb/src/common/util/File.cpp:
  Manual merge.
support-files/mysql.spec.sh:
  Manual merge.
2007-10-31 17:24:32 -04:00
unknown
a3b60d2d51 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/bar/mysql-work/mysql-5.1-new-rpl-merge


client/mysql.cc:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/func_regexp.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_bug31076.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/func_regexp.test:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_xmlfunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp_head.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_parse.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
strings/ctype-euc_kr.c:
  Auto merged
sql/sql_yacc.yy:
  Reverting Rafal's changes: TRANSACTIONAL_SYM was removed in a mistake.
mysql-test/r/ctype_ucs.result:
  After merge fix
mysql-test/suite/rpl/t/rpl_bug31076.test:
  After merge fix.
mysql-test/t/ctype_ucs.test:
  After megre fix
2007-10-30 12:03:34 +04: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
565c105c84 Bug#31633 Information schema = NULL queries crash the server
added correct handling of NULL values for lookup fields


mysql-test/r/information_schema.result:
  test result
mysql-test/t/information_schema.test:
  test case
sql/sql_show.cc:
  added correct handling of NULL values for lookup fields
2007-10-23 13:20:51 +05: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
666efa1c43 Bug#31381 Error in retrieving Data from INFORMATION_SCHEMA
move 'table_collation' field filling outside of if(file) condition
because this field has 'OPEN_FRM_ONLY' attribute


mysql-test/r/information_schema.result:
  test result
mysql-test/t/information_schema.test:
  test case
sql/sql_show.cc:
  move 'table_collation' field filling outside of if(file) condition
  because this field has 'OPEN_FRM_ONLY' attribute
2007-10-17 14:08:03 +05:00
unknown
7619a5efc6 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl


sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/rpl_record.cc:
  Manual merge.
2007-10-12 13:24:28 +02:00
unknown
bc2ecae3e8 Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b29549-mysql-5.1-target-5.1.22


mysql-test/suite/rpl/t/disabled.def:
  Auto merged
mysql-test/suite/rpl_ndb/t/disabled.def:
  Auto merged
sql/log.cc:
  Auto merged
sql/rpl_record.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
BitKeeper/deleted/.del-rpl_ndb_innodb2ndb.result~1:
  Delete: mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result
BitKeeper/deleted/.del-rpl_ndb_myisam2ndb.result~1:
  Delete: mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt:
  Manual merge
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test:
  Manual merge
mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt:
  Manual merge
mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test:
  Manual merge
sql/log_event.cc:
  Manual merge
sql/field.cc:
  Manual merge and adding comment.
sql/field.h:
  Manual merge.
2007-10-12 09:40:24 +02:00
unknown
06fb8c2d10 BUG#29549 (Endians: test failures on Solaris):
Refactoring code to add parameter to pack() and unpack() functions with
purpose of indicating if data should be packed in little-endian or
native order. Using new functions to always pack data for binary log
in little-endian order. The purpose of this refactoring is to allow
proper implementation of endian-agnostic pack() and unpack() functions.

Eliminating several versions of virtual pack() and unpack() functions
in favor for one single virtual function which is overridden in
subclasses.

Implementing pack() and unpack() functions for some field types that
packed data in native format regardless of the value of the
st_table_share::db_low_byte_first flag.

The field types that were packed in native format regardless are:
Field_real, Field_decimal, Field_tiny, Field_short, Field_medium,
Field_long, Field_longlong, and Field_blob.

Before the patch, row-based logging wrote the rows incorrectly on
big-endian machines where the storage engine defined its own
low_byte_first() to be FALSE on big-endian machines (the default
is TRUE), while little-endian machines wrote the fields in correct
order. The only known storage engine that does this is NDB. In effect,
this means that row-based replication from or to a big-endian
machine where the table was using NDB as storage engine failed if the
other engine was either non-NDB or on a little-endian machine.

With this patch, row-based logging is now always done in little-endian
order, while ORDER BY uses the native order if the storage engine
defines low_byte_first() to return FALSE for big-endian machines.

In addition, the max_data_length() function available in Field_blob
was generalized to the entire Field hierarchy to give the maximum
number of bytes that Field::pack() will write.


mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
  Sorting by columns that produces deterministic order.
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
  Result change.
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
  Result change.
mysql-test/suite/rpl/r/rpl_row_extraColmaster_ndb.result:
  Result change.
mysql-test/suite/rpl/t/disabled.def:
  Enabling tests.
mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test:
  Adding missing sync_slave_with_master causing slave to keep tables
  after shutdown.
mysql-test/suite/rpl_ndb/t/disabled.def:
  Enabling tests.
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt:
  Adding --new option
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test:
  Adding have_log_bin.
mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt:
  Adding --new option
mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test:
  Adding have_log_bin
mysql-test/t/partition.test:
  Adding have_archive, since that is used in the test.
sql/field.cc:
  Eliminating all two-argument pack() and unpack() functions and moving
  functionality into the four-argument version. The four argument version
  is introduced so that it is possible to avoid using the storage engine
  default when writing and reading the packed format (the unpacked format
  still uses the storage engine's default). This is used by row-based
  replication to write the fields in a storage engine- and endian-agnostic
  format.
  
  Packing integral and floating-point numbers in little-endian format
  (if requested).
  
  Using pad_char for the field instead of spaces (0x20) when unpacking.
  
  Adding some Doxygen documentation.
  ---
  Adding max_data_length() to denote the maximum number of bytes that
  pack() will write.
  
  Adding casts to remove warnings for debug printouts.
sql/field.h:
  Eliminating all virtual pack() and unpack() functions except the four-
  argument version, which now is the function that shall be overridden.
  The two-argument versions are convenience functions, to prevent changes
  to code that uses these.
  
  Adding code to pack integer numbers and floating-point numbers in
  little-endian format, if requested.
  ---
  Adding max_data_length() to denote the maximum number of bytes that
  pack() will write.
sql/log.cc:
  Removing debug printout causing crash when starting NDB on Solaris.
sql/log_event.cc:
  Adding missing #ifndef causing compile failure. Adding debug printouts.
sql/rpl_record.cc:
  Debriding code. Using new pack() and unpack() functions to always pack
  fields little-endian. Adding debug printouts.
  ---
  Using max_data_length() when packing field into row.
  
  Adding casts to debug printouts.
sql/sql_show.cc:
  Adding code that causes crash on Solaris machines since printf() cannot
  handle NULL values for strings properly.
mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result:
  New BitKeeper file ``mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result''
mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result:
  New BitKeeper file ``mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result''
2007-10-11 18:18:05 +02:00