Commit graph

448 commits

Author SHA1 Message Date
unknown
118677a293 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/cps/mysql/trees/mysql-5.1-virgin


sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/handler.cc:
  manual merge
2006-08-23 16:48:39 +04:00
unknown
992aceaf71 Fix for bug#19403/12212 "Crash that happens during removing of database name
from cache" and #21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES causes
server to crash".

Crash happened when one ran DROP DATABASE or SHOW OPEN TABLES statements
while concurrently doing DROP TABLE (or RENAME TABLE, CREATE TABLE LIKE
or any other command that takes name-lock) in other connection.

This problem was caused by the fact that table placeholders which were
added to table cache in order to obtain name-lock on table had
TABLE_SHARE::db and table_name set to 0. Therefore they broke assumption
that these members are non-0 for all tables in table cache on which some
of our code relies.

The fix sets these members for such placeholders to appropriate value making
this assumption true again. As attempt to avoid such problems in future
we introduce auxiliary TABLE_SHARE::set_table_cache_key() methods which
should be used when one wants to set TABLE_SHARE::table_cache_key and which
ensure that TABLE_SHARE::table_name/db are set properly.

Test cases for these bugs were added to 5.0 test-suite (with 5.0-specific
fix for bug #21216).


sql/lock.cc:
  Our code assumes that TABLE_SHARE::table_name/db for objects in table cache
  is set properly (and is non-NULL). For example look in list_open_tables()
  and remove_db_from_cache(). This was not true for table placeholders that
  were added to table cache for name-locking. Changed lock_table_name() to
  preserve this assumption (now it uses TABLE_SHARE::set_table_cache_key()
  to set all three table_cache_key/db/table_name members at once).
  Also now we use my_multi_malloc() to allocate memory for TABLE and
  TABLE_SHARE objects instead of using my_malloc() + summing sizes as
  it automatically provides proper alignment for memory allocated.
sql/sql_base.cc:
  Now we use TABLE_SHARE::set_table_cache_key() auxiliary methods to set
  TABLE_SHARE::table_cache_key/db/table_name members at once.
  We also use multi_alloc_root() instead of alloc_root() for allocating
  memory for several objects as it is less error prone.
  Finally, we also got rid of unused code in reopen_name_locked_table().
sql/sql_select.cc:
  Got rid of redundant code. TABLE_SHARE::db/table_cache_key are both set to
  empty string by the call to init_tmp_table_share() routine.
sql/table.cc:
  Now alloc_table_share() uses auxiliary TABLE_SHARE::set_table_cache_key()
  method to properly set TABLE_SHARE::table_cache_key/db/table_name members.
  Also now we use multi_alloc_root() instead of alloc_root() for allocating
  memory for several objects as it is more clear/less error-prone.
sql/table.h:
  Added comment about importance of apropriate setting of
  TABLE_SHARE::table_name/db/table_cache_key for tables in table cache.
  Introduced two auxiliary TABLE_SHARE::set_table_cache_key() methods which
  allow to set these three members at once.
2006-08-21 19:02:11 +04:00
unknown
b32b2ce7af Merge bk-internal.mysql.com:/data0/bk/tmp_reg
into  bk-internal.mysql.com:/data0/bk/mysql-5.1


client/mysql.cc:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/gis.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/im_life_cycle.result:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysql-test/r/type_newdecimal.result:
  Auto merged
mysql-test/r/type_ranges.result:
  Auto merged
mysql-test/r/type_timestamp.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/gis.test:
  Auto merged
mysql-test/t/im_life_cycle.imtest:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
mysql-test/t/type_timestamp.test:
  Auto merged
server-tools/instance-manager/messages.cc:
  Auto merged
sql/item_geofunc.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-08-17 17:19:41 +02:00
unknown
99adbd131a WL#3337 (Event scheduler new architecture)
Post-review fixes. Mostly whitespace, int-to-bool return value, fixed comments


sql/Makefile.am:
  compile all submodules of Events before compiling the facade
sql/event_data_objects.cc:
  - Use initialization list
  - Clean whitespaces
  - Shorten comments
  - Fix comments
sql/event_data_objects.h:
  - Fix whitespace
sql/event_db_repository.cc:
  - Change return type from int to bool where only one error code is
    returned.
  - Don't use macros but get the maximal number of characters in a column
    from the column
  - Fix  comments
  - Make functions which has return value but it's not used - void.
sql/event_db_repository.h:
  - Methods with only one error code int -> bool return value
  - Remove declaration of fill_schema_events, a function that does not exist
sql/event_queue.cc:
  - Use initialization lists
  - Let find_n_remove_event delete the object thus making the code more robust.
    The caller could forget to destruct the object. In addition, find_n_remove_element()
    does not return a value.
  - Move check_system_tables() to class Events
  - Fix comments
sql/event_queue.h:
  - Whitespace changes
  - init_queue() should allow passing of THD
  - check_system_tables moved to class Events
  - find_n_remove_event() is now void
sql/event_scheduler.cc:
  - Initialize res before use
  - Remove end stop from message
sql/event_scheduler.h:
  Add uninitialized state. The scheduler is in it before init_scheduler()
  is called. The rationale is that otherwise state has no value before
  the call. If the system tables were damaged the scheduler won't be initialized
  but in Events::deinit() Event_scheduler::stop() will be called and this will
  touch state, generating valgrind warning at minimum.
sql/events.cc:
  - Whitespace changes
  - Fix comments
  - Make methods which have only one error code be bool instead of int
  - Create temporarily a THD to be used for the initialization of Event_queue
  - Event_queue::check_system_tables() moved to Events::check_system_tables
  - is_started() is renamed to is_execution_of_events_started()
sql/events.h:
  - Whitespace changes
  - When a method returns only one error code it should be bool, not int
  - is_started() renamed to is_execution_of_events_started()
sql/set_var.cc:
  is_started() is renamed to is_execution_of_events_started()
sql/sql_db.cc:
  The return code is not used, thus don't return anything and drop_schema_events()
  is now void.
sql/sql_yacc.yy:
  - Fix comments
  - Remove unneeded initialization which is performed in lex_init()
sql/share/errmsg.txt:
  New error message
sql/table.cc:
  - Fix comments
  - make table_check_intact() accespt const *table_def
sql/table.h:
  Make table_check_intact() accespt const *table_def
2006-08-17 14:22:59 +02:00
unknown
f68085c4e7 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


BitKeeper/etc/ignore:
  auto-union
BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
  Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
  Auto merged
BitKeeper/deleted/.del-mysys.dsp~32695fee91189326:
  Auto merged
BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
  Auto merged
BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
  Auto merged
BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqlbinlog.cc:
  Auto merged
client/mysqlcheck.c:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
dbug/dbug.c:
  Auto merged
extra/perror.c:
  Auto merged
extra/yassl/src/yassl_imp.cpp:
  Auto merged
extra/yassl/src/yassl_int.cpp:
  Auto merged
include/mysql.h:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/r/cast.result:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/federated.result:
  Auto merged
mysql-test/r/func_compress.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/gis-rtree.result:
  Auto merged
mysql-test/r/gis.result:
  Auto merged
mysql-test/r/im_daemon_life_cycle.result:
  Auto merged
mysql-test/r/im_utils.result:
  Auto merged
mysql-test/r/join_outer.result:
  Auto merged
mysql-test/r/mysqlcheck.result:
  Auto merged
mysql-test/r/rpl_sp.result:
  Auto merged
mysql-test/r/rpl_trigger.result:
  Auto merged
mysql-test/r/sp-code.result:
  Auto merged
mysql-test/r/sp-security.result:
  Auto merged
mysql-test/r/strict.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/r/type_ranges.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/r/user_var.result:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
mysql-test/t/im_life_cycle.imtest:
  Auto merged
mysql-test/t/im_utils.imtest:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/mysqlbinlog.test:
  Auto merged
mysql-test/t/mysqlcheck.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/rpl_trigger.test:
  Auto merged
mysql-test/t/sp-security.test:
  Auto merged
mysql-test/t/strict.test:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/table.h:
  Auto merged
storage/ndb/src/kernel/error/ndbd_exit_codes.c:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
mysql-test/r/im_life_cycle.result:
  e
  use local
mysql-test/r/ps.result:
  use local
client/Makefile.am:
  Manual merge.
client/mysqlimport.c:
  Manual merge.
configure.in:
  Manual merge.
mysql-test/mysql-test-run.pl:
  Manual merge.
mysql-test/r/mysqldump.result:
  Manual merge.
mysql-test/r/mysqltest.result:
  Manual merge.
mysql-test/r/ndb_basic.result:
  Manual merge.
mysql-test/r/rpl_view.result:
  Manual merge.
mysql-test/r/show_check.result:
  Manual merge.
mysql-test/r/sp-error.result:
  Manual merge.
mysql-test/r/sp.result:
  Manual merge.
mysql-test/r/union.result:
  Manual merge.
mysql-test/t/mysqldump.test:
  Manual merge.
mysql-test/t/mysqltest.test:
  Manual merge.
mysql-test/t/ndb_basic.test:
  Manual merge.
mysql-test/t/rpl_sp.test:
  Manual merge.
mysql-test/t/rpl_view.test:
  Manual merge.
mysql-test/t/show_check.test:
  Manual merge.
mysql-test/t/sp-error.test:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
sql/item_sum.cc:
  Manual merge.
sql/mysql_priv.h:
  Manual merge.
sql/sp_head.cc:
  Manual merge.
sql/sql_db.cc:
  Manual merge.
sql/sql_delete.cc:
  Manual merge.
sql/sql_lex.h:
  Manual merge.
sql/sql_show.cc:
  Manual merge.
sql/sql_table.cc:
  Manual merge.
sql/sql_trigger.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
tests/mysql_client_test.c:
  Manual merge.
2006-08-12 21:06:51 +04:00
unknown
6017f911e3 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt


client/mysql.cc:
  Auto merged
mysql-test/r/im_life_cycle.result:
  Auto merged
mysql-test/t/im_life_cycle.imtest:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
2006-08-03 16:54:06 +02:00
unknown
e44e344cac Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge


sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/sp.result:
  Manual merge.
mysql-test/r/udf.result:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
mysql-test/t/udf.test:
  Manual merge.
2006-08-02 21:54:10 +04:00
unknown
f3919e9284 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge


include/mysql.h:
  Auto merged
include/sql_common.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/r/sp.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
sql/sql_prepare.cc:
  Manual merge.
sql/table.cc:
  Manual merge.
tests/mysql_client_test.c:
  Manual merge.
2006-08-02 14:13:01 +04:00
unknown
8ce7848a52 Merge sunlight.local:/local_work/tmp_merge-5.0-opt-mysql
into  sunlight.local:/local_work/tmp_merge-5.1-opt-mysql


client/mysql.cc:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
sql/sql_view.cc:
  SCCS merged
2006-08-01 20:52:21 +04:00
unknown
deee3a30d6 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  sunlight.local:/local_work/tmp_merge-5.1-opt-mysql


mysql-test/r/auto_increment.result:
  Auto merged
mysql-test/r/binlog_row_blackhole.result:
  Auto merged
mysql-test/r/binlog_stm_blackhole.result:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/func_compress.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_math.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/func_system.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/gis.result:
  Auto merged
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/group_min_max.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/partition_pruning.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/rpl_get_lock.result:
  Auto merged
mysql-test/r/rpl_master_pos_wait.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/group_min_max.test:
  Auto merged
mysql-test/t/partition_pruning.test:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.h:
  Auto merged
2006-08-01 09:24:19 +04:00
unknown
c8673b09b8 Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
When executing ALTER TABLE all the attributes of the view were overwritten.
  This is contrary to the user's expectations.
  So some of the view attributes are preserved now : namely security and 
  algorithm. This means that if they are not specified in ALTER VIEW
  their values are preserved from CREATE VIEW instead of being defaulted.


mysql-test/r/view.result:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - test suite
mysql-test/t/view.test:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - test suite
sql/sql_lex.h:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - must make create_view_suid a tristate : on/off/unspecified
sql/sql_view.cc:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - open the view to get it's attributes and put then as defaults 
     for ALTER VIEW
sql/sql_yacc.yy:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - must make create_view_suid a tristate : on/off/unspecified
sql/table.h:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - must make create_view_suid a tristate : on/off/unspecified
2006-07-31 17:33:37 +03:00
unknown
d10db4cf6c Merge rama.(none):/home/jimw/my/tmp_merge
into  rama.(none):/home/jimw/my/mysql-5.1-clean


client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
extra/yassl/include/openssl/ssl.h:
  Auto merged
extra/yassl/include/yassl_int.hpp:
  Auto merged
extra/yassl/src/ssl.cpp:
  Auto merged
extra/yassl/src/template_instnt.cpp:
  Auto merged
extra/yassl/src/yassl_imp.cpp:
  Auto merged
extra/yassl/src/yassl_int.cpp:
  Auto merged
include/mysql.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/embedded_priv.h:
  Auto merged
BitKeeper/deleted/.del-mysql_explain_log.sh~5ddc62808e16bd57:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
libmysqld/libmysqld.c:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/mysqldump-max.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
scripts/mysqld_safe.sh:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_string.h:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/time.cc:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
BitKeeper/deleted/.del-have_case_sensitive_file_system.inc:
  Delete: mysql-test/include/have_case_sensitive_file_system.inc
BitKeeper/deleted/.del-case_sensitive_file_system.require:
  Delete: mysql-test/r/case_sensitive_file_system.require
mysql-test/lib/mtr_cases.pl:
  Resolve conflict
mysql-test/mysql-test-run.pl:
  Resolve conflict
mysql-test/r/mysqldump.result:
  Resolve conflict
mysql-test/t/mysqldump.test:
  Resolve conflict
sql/sql_parse.cc:
  Resolve conflict
2006-07-28 15:51:48 -07:00
unknown
ef452e19bf BUG#14940 "MySQL choose wrong index", v.2
- Make the range-et-al optimizer produce E(#table records after table 
                                           condition is applied),
- Make the join optimizer use this value,
- Add "filtered" column to EXPLAIN EXTENDED to show 
  fraction of records left after table condition is applied
- Adjust test results, add comments


mysql-test/r/archive_gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/auto_increment.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/bdb_gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/bench_count_distinct.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/binlog_stm_blackhole.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/case.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/cast.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/compress.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ctype_collate.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ctype_cp1250_ch.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/date_formats.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/distinct.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/fulltext.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_compress.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_crypt.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_default.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_encrypt.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_gconcat.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_group.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_if.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_in.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_like.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_math.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_op.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_regexp.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_set.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_str.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_system.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_test.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_time.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/group_by.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/group_min_max.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/having.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/heap.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/heap_hash.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/index_merge.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/index_merge_innodb.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/index_merge_ror.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/innodb_gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/insert_update.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/join.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/join_nested.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/key_diff.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/myisam.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ndb_gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/negation_elimination.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/null.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/olap.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/partition_pruning.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/query_cache.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/row.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/rpl_get_lock.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/rpl_master_pos_wait.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/select.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ssl.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ssl_compress.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/subselect.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/type_blob.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/union.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/varbinary.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/variables.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/view.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/ctype_cp1250_ch.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/func_like.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/group_min_max.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/index_merge_ror.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/index_merge_ror_cpk.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/join.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/partition_pruning.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
sql/opt_range.cc:
  BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows -
    estimate of #records that will match the table condition.
sql/sql_class.cc:
  BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED
sql/sql_select.cc:
  BUG#14940: 
  - Make the join optimizer to use TABLE::quick_condition_rows=
    = E(#table records after filtering with table condition) 
  - Add "filtered" column to output of EXPLAIN EXTENDED
sql/sql_select.h:
  BUG#14940: Added comments
sql/table.h:
  BUG#14940: Added comments
2006-07-28 21:27:01 +04:00
unknown
9955388a45 Bug#20543 select on information_schema strange warnings, view, different schemas/users
The fix is: if user has privileges to view fields and user has any
(insert,select,delete,update) privileges on underlying view 
then 'show fields' and select from I_S.COLUMNS table are sucsessful.


mysql-test/r/information_schema_db.result:
  Bug#20543 select on information_schema strange warnings, view, different schemas/users
  test result
mysql-test/t/information_schema_db.test:
  Bug#20543 select on information_schema strange warnings, view, different schemas/users
  test case
sql/sql_acl.cc:
  Bug#20543 select on information_schema strange warnings, view, different schemas/users
  checked that user has privileges on underlying view and if it's true
  set allowed_show to true for top view.
sql/sql_show.cc:
  Bug#20543 select on information_schema strange warnings, view, different schemas/users
  removed unnecessary rights check.'tables->allowed_show' check is used instead
sql/sql_view.cc:
  Bug#20543 select on information_schema strange warnings, view, different schemas/users
  skip the check of SHOW_VIEW_ACL privilege on underlying view. It is done later during
  execution of find_field_in_table_ref function.
sql/table.h:
  Bug#20543 select on information_schema strange warnings, view, different schemas/users
  'allowed_show' is set during rights check for view. If true then user has privileges 
  for 'show create view', etc
2006-07-25 17:23:25 +05:00
unknown
7f70e111dd Merge myoffice.izhnet.ru:/usr/home/gluh/MySQL/tmp_merge
into  myoffice.izhnet.ru:/usr/home/gluh/MySQL/5.1


mysql-test/r/sp_notembedded.result:
  Auto merged
mysql-test/r/strict.result:
  Auto merged
mysql-test/t/strict.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
sql/handler.h:
  manual merge
sql/table.cc:
  manual merge
sql/unireg.cc:
  manual merge
tests/mysql_client_test.c:
  SCCS merged
2006-07-18 18:43:55 +05:00
unknown
35bfad1e3d 4.1 -> 5.0 merge
client/mysql.cc:
  Auto merged
client/sql_string.h:
  Auto merged
configure.in:
  Auto merged
myisam/mi_create.c:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
  Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_string.h:
  Auto merged
sql/table.cc:
  Auto merged
2006-07-13 16:35:25 -07:00
unknown
3ff08ab8cb Post-merge fixes for Bug#19399 "Stored Procedures 'Lost Connection'
when dropping/creating tables"


mysql-test/r/ps.result:
  A post-merge fix.
mysql-test/t/ps.test:
  A post-merge fix: all 5.0 tests should go after 4.1 tests.
sql/sql_lex.cc:
  auxilliary -> auxiliary
sql/sql_prepare.cc:
  auxilliary -> auxiliary
sql/table.cc:
  Update st_table_list::reinit_before_use in 5.0 to include 5.0-specific
  cleanups.
sql/table.h:
  st_table_list::reinit_before_use is public.
2006-07-11 23:39:51 +04:00
unknown
d8b447a1b6 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge-41


ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge: use local.
mysql-test/t/ps.test:
  Manual merge: remove duplicate test cases from ps.test.
sql/sql_lex.cc:
  Manual merge.
sql/sql_prepare.cc:
  Manual merge.
sql/table.h:
  Manual merge.
2006-07-11 21:19:57 +04:00
unknown
8995277acc A fix and a test case for Bug#19399 "res 'Lost Connection' when
dropping/creating tables".

The bug could lead to a crash when multi-delete statements were
prepared and used with temporary tables.

The bug was caused by lack of clean-up of multi-delete tables before
re-execution of a prepared statement. In a statement like
DELETE t1 FROM t1, t2 WHERE ... the first table list (t1) is
moved to lex->auxilliary_table_list and excluded from lex->query_tables
or select_lex->tables. Thus it was unaccessible to reinit_stmt_before_use
and not cleaned up before re-execution of a prepared statement. 


mysql-test/r/ps.result:
  Updated test results (Bug#19399)
mysql-test/t/ps.test:
  A test case for Bug#19399 "Stored Procedures 'Lost Connection' when 
  dropping/creating tables": test that multi-delete
  tables are cleaned up properly before re-execution.
sql/sql_lex.cc:
  Always initialize auxilliary_table_list when we initialize the lex:
  this way we don't have to check that lex->sql_command equals to
  SQLCOM_DELETE_MULTI whenever we need to access auxilliary_table_list.
  In particular, in reinit_stmt_before_use we can simply check that
  auxilliary_table_list is not NULL and clean it up if the check returns
  a true value.
sql/sql_prepare.cc:
  Move the one table clean-up functionality to a method of st_table_list.
  Clean up auxiliary_table_list if it's not empty.
sql/table.cc:
  Implement st_table_list::reinit_before_use().
sql/table.h:
  Declare st_table_list::reinit_before_use().
2006-07-06 23:59:04 +04:00
unknown
df9b4754b7 Merge bodhi.netgear:/opt/local/work/tmp_merge
into  bodhi.netgear:/opt/local/work/mysql-5.1-runtime-merge-with-5.0


mysql-test/r/create.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.cc:
  Auto merged
include/my_sys.h:
  Manual merge (second attempt).
mysql-test/r/bdb.result:
  Manual merge (second attempt).
mysql-test/t/bdb.test:
  Manual merge (second attempt).
mysys/my_malloc.c:
  Manual merge (second attempt).
mysys/safemalloc.c:
  Manual merge (second attempt).
sql/ha_federated.cc:
  Manual merge (second attempt).
sql/log_event.cc:
  Manual merge (second attempt).
sql/set_var.cc:
  Manual merge (second attempt).
sql/set_var.h:
  Manual merge (second attempt).
sql/slave.cc:
  Manual merge (second attempt).
sql/slave.h:
  Manual merge (second attempt).
sql/sql_class.h:
  Manual merge (second attempt).
sql/sql_table.cc:
  Manual merge (second attempt).
sql/sql_udf.cc:
  Manual merge (second attempt).
sql/sql_yacc.yy:
  Manual merge (second attempt).
2006-07-06 22:55:48 +04:00
unknown
8703b22e16 Fix for bug#13934 Silent truncation of table comments
Table comment: issue a warning(error in traditional mode) if length of comment > 60 symbols
Column comment: issue a warning(error in traditional mode) if length of comment > 255 symbols
Table 'comment' is changed from char* to LEX_STRING


mysql-test/r/strict.result:
  test case
mysql-test/t/strict.test:
  test case
sql/handler.h:
  Table 'comment' is changed from char* to LEX_STRING
sql/sql_show.cc:
  Table 'comment' is changed from char* to LEX_STRING
sql/sql_table.cc:
  Table 'comment' is changed from char* to LEX_STRING
sql/sql_yacc.yy:
  Table 'comment' is changed from char* to LEX_STRING
sql/table.cc:
  Table 'comment' is changed from char* to LEX_STRING
sql/table.h:
  Table 'comment' is changed from char* to LEX_STRING
sql/unireg.cc:
  Fix for bug#13934 Silent truncation of table comments
  Table comment: issue a warning(error in traditional mode) if length of comment > 60 symbols
  Column comment: issue a warning(error in traditional mode) if length of comment > 255 symbols
2006-06-29 18:39:34 +05:00
unknown
e3ef15ea37 Fix compilation failures on Windows caused by the patch for Bug#17199.
Fix a minor issue with Bug#16206 (bdb.test failed if the tree is compiled 
without blackhole).


include/my_sys.h:
  Change declaration of my_strdup_with_length to accept const char *,
  not const byte *: in 5 places out of 6 where this function is used,
  it's being passed char *, not byte *
mysql-test/r/bdb.result:
  Remove dependency on an optional engine (updated test results).
mysql-test/t/bdb.test:
  Remove dependency on an optional engine.
mysys/my_malloc.c:
  my_strdup_with_length: const byte * -> const char *
mysys/safemalloc.c:
  my_strdup_with_length: const byte * -> const char *
sql/ha_federated.cc:
  my_strdup_with_length: const byte * -> const char *
sql/log_event.cc:
  my_strdup_with_length: const byte * -> const char *
sql/set_var.cc:
  my_strdup_with_length: const byte * -> const char *
sql/sql_class.h:
  Change db_length type to uint from uint32 (see also table.h)
sql/table.h:
  Change the type of db_length to uint from uint32: LEX_STRING uses uint for 
  length, we need a small and consistent set of types to store length to 
  minimize cast and compile failures.
2006-06-27 14:56:24 +04:00
unknown
555eb848f2 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/my/mysql-5.1


BitKeeper/etc/ignore:
  auto-union
include/heap.h:
  Auto merged
include/my_base.h:
  Auto merged
include/mysql_com.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Auto merged
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/ndb_index_unique.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/ha_heap.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_myisam.h:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/ha_partition.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/spatial.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_bitmap.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/archive/ha_archive.cc:
  Auto merged
storage/archive/ha_archive.h:
  Auto merged
storage/example/ha_example.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
unittest/mysys/base64-t.c:
  Auto merged
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/t/innodb_mysql.test:
  manual merge
mysql-test/valgrind.supp:
  manual merge
sql/event.cc:
  manual merge
sql/ha_heap.cc:
  manual merge
sql/ha_myisam.cc:
  manual merge
sql/ha_ndbcluster.cc:
  manual merge
sql/ha_ndbcluster_binlog.cc:
  manual merge
sql/ha_partition.cc:
  manual merge
sql/handler.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/handler.h:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/item.h:
  automatic merge
sql/item_cmpfunc.cc:
  automatic merge
sql/log_event.cc:
  manual merge
  Trivial cleanup
sql/mysql_priv.h:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/opt_range.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_delete.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_insert.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_load.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_select.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_show.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_table.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_update.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/table.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
storage/blackhole/ha_blackhole.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
storage/csv/ha_tina.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
mysql-test/valgrind.supp.orig:
  Manual merge
2006-06-04 21:05:22 +03:00
unknown
01d03e7b4b This changeset is largely a handler cleanup changeset (WL#3281), but includes fixes and cleanups that was found necessary while testing the handler changes
Changes that requires code changes in other code of other storage engines.
(Note that all changes are very straightforward and one should find all issues
by compiling a --debug build and fixing all compiler errors and all
asserts in field.cc while running the test suite),

- New optional handler function introduced: reset()
  This is called after every DML statement to make it easy for a handler to
  statement specific cleanups.
  (The only case it's not called is if force the file to be closed)

- handler::extra(HA_EXTRA_RESET) is removed. Code that was there before
  should be moved to handler::reset()

- table->read_set contains a bitmap over all columns that are needed
  in the query.  read_row() and similar functions only needs to read these
  columns
- table->write_set contains a bitmap over all columns that will be updated
  in the query. write_row() and update_row() only needs to update these
  columns.
  The above bitmaps should now be up to date in all context
  (including ALTER TABLE, filesort()).

  The handler is informed of any changes to the bitmap after
  fix_fields() by calling the virtual function
  handler::column_bitmaps_signal(). If the handler does caching of
  these bitmaps (instead of using table->read_set, table->write_set),
  it should redo the caching in this code. as the signal() may be sent
  several times, it's probably best to set a variable in the signal
  and redo the caching on read_row() / write_row() if the variable was
  set.

- Removed the read_set and write_set bitmap objects from the handler class

- Removed all column bit handling functions from the handler class.
  (Now one instead uses the normal bitmap functions in my_bitmap.c instead
  of handler dedicated bitmap functions)

- field->query_id is removed. One should instead instead check
  table->read_set and table->write_set if a field is used in the query.

- handler::extra(HA_EXTRA_RETRIVE_ALL_COLS) and
  handler::extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) are removed. One should now
  instead use table->read_set to check for which columns to retrieve.

- If a handler needs to call Field->val() or Field->store() on columns
  that are not used in the query, one should install a temporary
  all-columns-used map while doing so. For this, we provide the following
  functions:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
  field->val();
  dbug_tmp_restore_column_map(table->read_set, old_map);

  and similar for the write map:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
  field->val();
  dbug_tmp_restore_column_map(table->write_set, old_map);

  If this is not done, you will sooner or later hit a DBUG_ASSERT
  in the field store() / val() functions.
  (For not DBUG binaries, the dbug_tmp_restore_column_map() and
  dbug_tmp_restore_column_map() are inline dummy functions and should
  be optimized away be the compiler).

- If one needs to temporary set the column map for all binaries (and not
  just to avoid the DBUG_ASSERT() in the Field::store() / Field::val()
  methods) one should use the functions tmp_use_all_columns() and
  tmp_restore_column_map() instead of the above dbug_ variants.

- All 'status' fields in the handler base class (like records,
  data_file_length etc) are now stored in a 'stats' struct. This makes
  it easier to know what status variables are provided by the base
  handler.  This requires some trivial variable names in the extra()
  function.

- New virtual function handler::records().  This is called to optimize
  COUNT(*) if (handler::table_flags() & HA_HAS_RECORDS()) is true.
  (stats.records is not supposed to be an exact value. It's only has to
  be 'reasonable enough' for the optimizer to be able to choose a good
  optimization path).

- Non virtual handler::init() function added for caching of virtual
  constants from engine.

- Removed has_transactions() virtual method. Now one should instead return
  HA_NO_TRANSACTIONS in table_flags() if the table handler DOES NOT support
  transactions.

- The 'xxxx_create_handler()' function now has a MEM_ROOT_root argument
  that is to be used with 'new handler_name()' to allocate the handler
  in the right area.  The xxxx_create_handler() function is also
  responsible for any initialization of the object before returning.

  For example, one should change:

  static handler *myisam_create_handler(TABLE_SHARE *table)
  {
    return new ha_myisam(table);
  }

  ->

  static handler *myisam_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
  {
    return new (mem_root) ha_myisam(table);
  }

- New optional virtual function: use_hidden_primary_key().
  This is called in case of an update/delete when
  (table_flags() and HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) is defined
  but we don't have a primary key. This allows the handler to take precisions
  in remembering any hidden primary key to able to update/delete any
  found row. The default handler marks all columns to be read.

- handler::table_flags() now returns a ulonglong (to allow for more flags).

- New/changed table_flags()
  - HA_HAS_RECORDS	    Set if ::records() is supported
  - HA_NO_TRANSACTIONS	    Set if engine doesn't support transactions
  - HA_PRIMARY_KEY_REQUIRED_FOR_DELETE
                            Set if we should mark all primary key columns for
			    read when reading rows as part of a DELETE
			    statement. If there is no primary key,
			    all columns are marked for read.
  - HA_PARTIAL_COLUMN_READ  Set if engine will not read all columns in some
			    cases (based on table->read_set)
 - HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS
   			    Renamed to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
 - HA_DUPP_POS              Renamed to HA_DUPLICATE_POS
 - HA_REQUIRES_KEY_COLUMNS_FOR_DELETE
			    Set this if we should mark ALL key columns for
			    read when when reading rows as part of a DELETE
			    statement. In case of an update we will mark
			    all keys for read for which key part changed
			    value.
  - HA_STATS_RECORDS_IS_EXACT
			     Set this if stats.records is exact.
			     (This saves us some extra records() calls
			     when optimizing COUNT(*))
			    

- Removed table_flags()
  - HA_NOT_EXACT_COUNT     Now one should instead use HA_HAS_RECORDS if
			   handler::records() gives an exact count() and
			   HA_STATS_RECORDS_IS_EXACT if stats.records is exact.
  - HA_READ_RND_SAME	   Removed (no one supported this one)

- Removed not needed functions ha_retrieve_all_cols() and ha_retrieve_all_pk()

- Renamed handler::dupp_pos to handler::dup_pos

- Removed not used variable handler::sortkey


Upper level handler changes:

- ha_reset() now does some overall checks and calls ::reset()
- ha_table_flags() added. This is a cached version of table_flags(). The
  cache is updated on engine creation time and updated on open.


MySQL level changes (not obvious from the above):

- DBUG_ASSERT() added to check that column usage matches what is set
  in the column usage bit maps. (This found a LOT of bugs in current
  column marking code).

- In 5.1 before, all used columns was marked in read_set and only updated
  columns was marked in write_set. Now we only mark columns for which we
  need a value in read_set.

- Column bitmaps are created in open_binary_frm() and open_table_from_share().
  (Before this was in table.cc)

- handler::table_flags() calls are replaced with handler::ha_table_flags()

- For calling field->val() you must have the corresponding bit set in
  table->read_set. For calling field->store() you must have the
  corresponding bit set in table->write_set. (There are asserts in
  all store()/val() functions to catch wrong usage)

- thd->set_query_id is renamed to thd->mark_used_columns and instead
  of setting this to an integer value, this has now the values:
  MARK_COLUMNS_NONE, MARK_COLUMNS_READ, MARK_COLUMNS_WRITE
  Changed also all variables named 'set_query_id' to mark_used_columns.

- In filesort() we now inform the handler of exactly which columns are needed
  doing the sort and choosing the rows.

- The TABLE_SHARE object has a 'all_set' column bitmap one can use
  when one needs a column bitmap with all columns set.
  (This is used for table->use_all_columns() and other places)

- The TABLE object has 3 column bitmaps:
  - def_read_set     Default bitmap for columns to be read
  - def_write_set    Default bitmap for columns to be written
  - tmp_set          Can be used as a temporary bitmap when needed.
  The table object has also two pointer to bitmaps read_set and write_set
  that the handler should use to find out which columns are used in which way.

- count() optimization now calls handler::records() instead of using
  handler->stats.records (if (table_flags() & HA_HAS_RECORDS) is true).

- Added extra argument to Item::walk() to indicate if we should also
  traverse sub queries.

- Added TABLE parameter to cp_buffer_from_ref()

- Don't close tables created with CREATE ... SELECT but keep them in
  the table cache. (Faster usage of newly created tables).


New interfaces:

- table->clear_column_bitmaps() to initialize the bitmaps for tables
  at start of new statements.

- table->column_bitmaps_set() to set up new column bitmaps and signal
  the handler about this.

- table->column_bitmaps_set_no_signal() for some few cases where we need
  to setup new column bitmaps but don't signal the handler (as the handler
  has already been signaled about these before). Used for the momement
  only in opt_range.cc when doing ROR scans.

- table->use_all_columns() to install a bitmap where all columns are marked
  as use in the read and the write set.

- table->default_column_bitmaps() to install the normal read and write
  column bitmaps, but not signaling the handler about this.
  This is mainly used when creating TABLE instances.

- table->mark_columns_needed_for_delete(),
  table->mark_columns_needed_for_delete() and
  table->mark_columns_needed_for_insert() to allow us to put additional
  columns in column usage maps if handler so requires.
  (The handler indicates what it neads in handler->table_flags())

- table->prepare_for_position() to allow us to tell handler that it
  needs to read primary key parts to be able to store them in
  future table->position() calls.
  (This replaces the table->file->ha_retrieve_all_pk function)

- table->mark_auto_increment_column() to tell handler are going to update
  columns part of any auto_increment key.

- table->mark_columns_used_by_index() to mark all columns that is part of
  an index.  It will also send extra(HA_EXTRA_KEYREAD) to handler to allow
  it to quickly know that it only needs to read colums that are part
  of the key.  (The handler can also use the column map for detecting this,
  but simpler/faster handler can just monitor the extra() call).

- table->mark_columns_used_by_index_no_reset() to in addition to other columns,
  also mark all columns that is used by the given key.

- table->restore_column_maps_after_mark_index() to restore to default
  column maps after a call to table->mark_columns_used_by_index().

- New item function register_field_in_read_map(), for marking used columns
  in table->read_map. Used by filesort() to mark all used columns

- Maintain in TABLE->merge_keys set of all keys that are used in query.
  (Simplices some optimization loops)

- Maintain Field->part_of_key_not_clustered which is like Field->part_of_key
  but the field in the clustered key is not assumed to be part of all index.
  (used in opt_range.cc for faster loops)

-  dbug_tmp_use_all_columns(), dbug_tmp_restore_column_map()
   tmp_use_all_columns() and tmp_restore_column_map() functions to temporally
   mark all columns as usable.  The 'dbug_' version is primarily intended
   inside a handler when it wants to just call Field:store() & Field::val()
   functions, but don't need the column maps set for any other usage.
   (ie:: bitmap_is_set() is never called)

- We can't use compare_records() to skip updates for handlers that returns
  a partial column set and the read_set doesn't cover all columns in the
  write set. The reason for this is that if we have a column marked only for
  write we can't in the MySQL level know if the value changed or not.
  The reason this worked before was that MySQL marked all to be written
  columns as also to be read. The new 'optimal' bitmaps exposed this 'hidden
  bug'.

- open_table_from_share() does not anymore setup temporary MEM_ROOT
  object as a thread specific variable for the handler. Instead we
  send the to-be-used MEMROOT to get_new_handler().
  (Simpler, faster code)



Bugs fixed:

- Column marking was not done correctly in a lot of cases.
  (ALTER TABLE, when using triggers, auto_increment fields etc)
  (Could potentially result in wrong values inserted in table handlers
  relying on that the old column maps or field->set_query_id was correct)
  Especially when it comes to triggers, there may be cases where the
  old code would cause lost/wrong values for NDB and/or InnoDB tables.

- Split thd->options flag OPTION_STATUS_NO_TRANS_UPDATE to two flags:
  OPTION_STATUS_NO_TRANS_UPDATE and OPTION_KEEP_LOG.
  This allowed me to remove some wrong warnings about:
  "Some non-transactional changed tables couldn't be rolled back"

- Fixed handling of INSERT .. SELECT and CREATE ... SELECT that wrongly reset
  (thd->options & OPTION_STATUS_NO_TRANS_UPDATE) which caused us to loose
  some warnings about
  "Some non-transactional changed tables couldn't be rolled back")

- Fixed use of uninitialized memory in ha_ndbcluster.cc::delete_table()
  which could cause delete_table to report random failures.

- Fixed core dumps for some tests when running with --debug

- Added missing FN_LIBCHAR in mysql_rm_tmp_tables()
  (This has probably caused us to not properly remove temporary files after
  crash)

- slow_logs was not properly initialized, which could maybe cause
  extra/lost entries in slow log.

- If we get an duplicate row on insert, change column map to read and
  write all columns while retrying the operation. This is required by
  the definition of REPLACE and also ensures that fields that are only
  part of UPDATE are properly handled.  This fixed a bug in NDB and
  REPLACE where REPLACE wrongly copied some column values from the replaced
  row.

- For table handler that doesn't support NULL in keys, we would give an error
  when creating a primary key with NULL fields, even after the fields has been
  automaticly converted to NOT NULL.

- Creating a primary key on a SPATIAL key, would fail if field was not
  declared as NOT NULL.


Cleanups:

- Removed not used condition argument to setup_tables

- Removed not needed item function reset_query_id_processor().

- Field->add_index is removed. Now this is instead maintained in
  (field->flags & FIELD_IN_ADD_INDEX)

- Field->fieldnr is removed (use field->field_index instead)

- New argument to filesort() to indicate that it should return a set of
  row pointers (not used columns). This allowed me to remove some references
  to sql_command in filesort and should also enable us to return column
  results in some cases where we couldn't before.

- Changed column bitmap handling in opt_range.cc to be aligned with TABLE
  bitmap, which allowed me to use bitmap functions instead of looping over
  all fields to create some needed bitmaps. (Faster and smaller code)

- Broke up found too long lines

- Moved some variable declaration at start of function for better code
  readability.

- Removed some not used arguments from functions.
  (setup_fields(), mysql_prepare_insert_check_table())

- setup_fields() now takes an enum instead of an int for marking columns
   usage.

- For internal temporary tables, use handler::write_row(),
  handler::delete_row() and handler::update_row() instead of
  handler::ha_xxxx() for faster execution.

- Changed some constants to enum's and define's.

- Using separate column read and write sets allows for easier checking
  of timestamp field was set by statement.

- Remove calls to free_io_cache() as this is now done automaticly in ha_reset()

- Don't build table->normalized_path as this is now identical to table->path
  (after bar's fixes to convert filenames)

- Fixed some missed DBUG_PRINT(.."%lx") to use "0x%lx" to make it easier to
  do comparision with the 'convert-dbug-for-diff' tool.


Things left to do in 5.1:

- We wrongly log failed CREATE TABLE ... SELECT in some cases when using
  row based logging (as shown by testcase binlog_row_mix_innodb_myisam.result)
  Mats has promised to look into this.

- Test that my fix for CREATE TABLE ... SELECT is indeed correct.
  (I added several test cases for this, but in this case it's better that
  someone else also tests this throughly).
  Lars has promosed to do this.


BitKeeper/etc/ignore:
  added mysys/test_bitmap
include/base64.h:
  Removed my_global.h, as this must be included first in any program
include/heap.h:
  Added heap_reset() (Required by new handler interface)
include/my_base.h:
  Removed HA_EXTRA_RESET. MySQL will now call ::reset() instead of ::extra(HA_EXTRA_RESET).
  HA_EXTRA_RETRIVE_ALL_COLS and HA_EXTRA_RETRIVE_PRIMARY key are deleted as the column bitmaps makes these unnecessary
include/my_bitmap.h:
  Remove my_pthread.h (should be included at upper level)
  Introduced my_bitmap_map typedef to make it the bitmap handling more like a black box
  Added bitmap_is_overlapping(), bitmap_test_and_clear(), bitmap_copy() and bitmap_cmp()
  Made bitmap_set_bit(), bitmap_flip_bit(), bitmap_clear_bit() return void
include/myisam.h:
  Added mi_reset() (Required by new handler interface)
include/myisammrg.h:
  Added myrg_reset() (Required by new handler interface)
include/mysql_com.h:
  Added flag FIELD_IN_ADD_INDEX to be able to remove Field->add_index
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Added testing of CREATE ... SELECT in a mixed environment
  (This found some bugs that Mats is going to fix shortly)
mysql-test/install_test_db.sh:
  Simplify ldata usage
  Added --tmpdir=. option to mysqld bootstrap (Removed some warnings when TMPDIR was wrongly set)
mysql-test/mysql-test-run.pl:
  Added --tmpdir=. to bootstrap
mysql-test/mysql-test-run.sh:
  Use copy instead of INSTALL_DB for master and slave databases.
  (Speeds up startup time a lot!)
  Remove snapshot directories at startup (removes some strange warnings)
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Added testing of CREATE ... SELECT in a mixed environment
  (This found some bugs that Mats is going to fix shortly)
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
  Added testing of CREATE ... SELECT in a mixed environment
mysql-test/r/create.result:
  Some extra tests of warnings and number of tables opened by CREATE ... SELECT
mysql-test/r/federated.result:
  Drop some left over tables
  Added testing of multiple table update and multiple table delete (with and without keys)
mysql-test/r/func_gconcat.result:
  Enable some disabled tests (converted them slightly to be predictable)
mysql-test/r/func_time.result:
  Added drop of test function
mysql-test/r/innodb_mysql.result:
  Added tests for CREATE ... SELECT
mysql-test/r/insert.result:
  More tests
  Added testing of duplicate columns in insert
mysql-test/r/loaddata.result:
  Added testing LOAD DATA ... SET ...
mysql-test/r/multi_update.result:
  Test multi updates and deletes using primary key and without
mysql-test/r/ndb_index_unique.result:
  Better error message
mysql-test/r/ndb_replace.result:
  New correct result after fixing REPLACE handling with NDB
mysql-test/r/rpl_ddl.result:
  Now we don't get these (wrong) warnings anymore
mysql-test/r/view_grant.result:
  Drop used views
mysql-test/t/create.test:
  Some extra tests of warnings and number of tables opened by CREATE ... SELECT
mysql-test/t/federated.test:
  Drop some left over tables
  Added testing of multiple table update and multiple table delete (with and without keys)
mysql-test/t/func_gconcat.test:
  Enable some disabled tests (converted them slightly to be predictable)
mysql-test/t/func_time.test:
  Added drop of test function
mysql-test/t/innodb_mysql.test:
  Added tests for CREATE ... SELECT
mysql-test/t/insert.test:
  More tests
  Added testing of duplicate columns in insert
mysql-test/t/loaddata.test:
  Added testing LOAD DATA ... SET ...
mysql-test/t/multi_update.test:
  Test multi updates and deletes using primary key and without
mysql-test/t/view_grant.test:
  Drop used views
mysql-test/valgrind.supp:
  Added supression of not needed warnings when printing stack trace
mysys/base64.c:
  Include my_global.h first
mysys/my_bitmap.c:
  Added bitmap_is_overlapping(), bitmap_test_and_clear() and bitmap_copy()
  Changed logic of bitmap handling to be a bit more efficent (Did this together with Mikael Ronström)
  Now the 'extra, not used bits' in the bitmap are assumed to have a 'random value' and the bitmap functions are free to change them whenever needed.
  Changed how mutex is allocated to make 'bitmap_free()' function simpler.
mysys/thr_lock.c:
  Added 0x before thread pointers (for easier comparison of DBUG traces)
sql/event.cc:
  Ensure 'use_all_columns()' is used for event tables
  Don't print warning that event table is damaged if it doesn't exists.
sql/field.cc:
  Added ASSERT_COLUMN_MARKED_FOR_WRITE in all store() methods and ASSERT_COLUMN_MARKED_FOR_READ in all val() methods to catch wrong setting if table->read_set and table->write_set
  (Rest of changes are only indentation cleanups)
sql/field.h:
  Removed Field->query_id (replaced by table->read_set and table->write_set)
  Removed Field->fieldnr (use Field->field_index instead)
  Removed Field->add_index (Use Field->flags instead)
  Add Field->part_of_key_not_clustered (for usage in opt_range.cc)
sql/filesort.cc:
  Added paramater sort_postion to filesort() to force sorting by position instead of storing all fields in the result set.
  This allowed me to remove checking of sql_command.
  Create a temporary column bitmap for fields that are used by the sorting process.
  Use column bitmaps instead of query_id
sql/ha_berkeley.cc:
  Update to 'newer' table handler interface
sql/ha_berkeley.h:
  Update to 'newer' table handler interface
sql/ha_federated.cc:
  Update to 'newer' table handler interface
  Only read columns that are needed from remote server.
  In case of eq ranges, don't generate two conditions in the WHERE clause
  (this can still be optimized, but would require a bigger code change)
  Use 'simpler to use' XXXX_LEN' macros
  A bit simpler logic in ::write_row() when creating statements.
  In update, only include test of fields actually read.
  (This greatly simplifies the queries sent by the federated engine)
  Similar changes done for delete_row()
sql/ha_federated.h:
  Update to 'newer' table handler interface
  Changed XXX_LEN macros to use sizeof(...)-1, to simplify usage in ha_federated.cc
  Added HA_PRIMARY_KEY_REQUIRED_FOR_DELETE to tell MySQL to read all primary key columns in case of DELETE
sql/ha_heap.cc:
  Update to 'newer' table handler interface
sql/ha_heap.h:
  Update to 'newer' table handler interface
sql/ha_innodb.cc:
  Update to 'newer' table handler interface
  - Update innobase_create_handler() to new interface
  - Removed HA_NOT_EXACT_COUNT (not needed)
  - Renamed HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
  - Prefixed base status variables with 'stats'
  - Use table column bitmaps instead of ha_get_bit_in_read_set()
  - Added ::reset(), with code from ::extra(HA_EXTRA_RESET)
  - Removed HA_EXTRA_RETRIVE_ALL_COLS and HA_EXTRA_RETRIEVE_PRIMARY_KEY as
    the table->read_set and table->write_set bitmaps now are accurate
sql/ha_innodb.h:
  Update to 'newer' table handler interface
  - table_flags are now ulonglong
  - Added reset() method
  - Removed not needed ha_retrieve_all_cols() and ha_retrieve_all_pk() columns.
  - Made build_template() a class function to be able to easier access class variables
sql/ha_myisam.cc:
  Update to 'newer' table handler interface
sql/ha_myisam.h:
  Update to 'newer' table handler interface
sql/ha_myisammrg.cc:
  Update to 'newer' table handler interface
sql/ha_myisammrg.h:
  Update to 'newer' table handler interface
sql/ha_ndbcluster.cc:
  Update to 'newer' table handler interface
  Fixed use_blob_value() to be accurate
  In ::complemented_read() we have to check both the read and write bitmap as the old code did mark all changed columns also in the read map
  Correct dumping of field data with DBUG_DUMP
  Prefix addresses in DBUG_PRINT with 0x
  Fixed usage of not initialized memory
  Update to use field->flags & FIELD_IN_ADD_INDEX instead of field->add_index.
sql/ha_ndbcluster.h:
  Update to 'newer' table handler interface
sql/ha_ndbcluster_binlog.cc:
  Mark usage of all columns in ndbcluster binlog tables
  false -> FALSE, true -> TRUE
  Use table->s->all_set instead of creating a temporary bitmap.
sql/ha_partition.cc:
  Update to 'newer' table handler interface
  Added memroot to initialise_partitions() and related functions to get faster memory allocation.
  partition_create_handler() is now responsible for initialisation of the partition object
  Some trivial optimizations and indentation fixes
  Ensure that table_flags() are up to date
  Removed documentation for removed HA_EXTRA flags
  Fixed 'strange' usage of m_file[i] in new_handlers_from_part_info()that worked in current code 'by chance'
sql/ha_partition.h:
  Update to 'newer' table handler interface
sql/handler.cc:
  create_xxx handler now takes MEMROOT as an argument to simplify memory allocation.
  Much simpler get_new_handler()
  (Initialization of the object is now handled by the create method for the engine)
  Moved all allocation of bitmap handling to the TABLE object (in table.cc)
  Added column_bitmaps_signal() to signal column usage changes.
  Changed binlog_log_row() to use the exiusting all_set bitmap in the table object.
  Added ha_reset() function to test that the file object is ok at end of statement and call handler::reset()
  Added use_hidden_primary_key() to signal handler that we we are going to read and update + delete the row and the handler should thus remember the position for the row
sql/handler.h:
  Added HA_NO_TRANSACTIONS, HA_PARTIAL_COLUMN_READ, HA_REQUIRES_KEY_COLUMNS_FOR_DELETE,HA_PRIMARY_KEY_REQUIRED_FOR_DELETE and HA_HAS_RECORDS
  Removed HA_NOT_EXACT_COUNT, HA_READ_RND_SAME
  HA_DUPP_POS -> HA_DUPLICATE_POS
  HA_NOT_EXACT_COUNT replaced by HA_STATS_RECORDS_IS_EXACT, HA_HAS_RECORDS and records()
  HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS renamed to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION
  Added future row type 'ROW_TYPE_PAGES'
  Added MEM_ROOT to handlerton 'create' function
  Added ha_statistics, a structure for all status variable in the base handler class.
  Moved all status variables in the handler class into a stats structs to improve readability.
  ha_table_flags() is now a cached (not virtual) version of table_flags()
  reset() doesn't anymore call extra(HA_EXTRA_RESET) but is a function of it's own.
  Renamed dupp_ref to dup_ref
  Renamed not used handler::sortkey
  Moved read_set and write_set to TABLE structure
  handler::init() function added for cacheing of virtual constants from engine.
sql/item.cc:
  Added register_field_in_read_map() for marking used columns in expression.
  This is used by filesort() for creating an optimal column bitmap while retrieving columns for sorting.
  Initalize value.cs_info.character_set_client to fix core dump bug with --debug
  set_query_id -> mark_used_columns
  Mark used columns in read_set OR write_set.
sql/item.h:
  Removed reset_query_id_processor() as it's not needed anymore.
  Added register_field_in_read_map()
  Added extra argument to Item::walk() to indicate if we should also
  traverse sub queries.
sql/item_cmpfunc.cc:
  Temporary mark used columns to be read/writable
  Update Item::walk to new interface
sql/item_cmpfunc.h:
  Added extra argument to Item::walk() to indicate if we should also traverse sub queries.
sql/item_func.cc:
  Update Item::walk() to new interface
  table_flags() -> ha_table_flags()
sql/item_func.h:
  Update Item::walk() to new interface
sql/item_row.cc:
  Update Item::walk() to new interface
sql/item_row.h:
  Update Item::walk() to new interface
sql/item_strfunc.h:
  Update Item::walk() to new interface
sql/item_subselect.cc:
  Added Item_subselect::walk()
  (It was a bug it was missing before. Not sure what kind of bugs this could have caused)
sql/item_subselect.h:
  Update Item::walk() to new interface
sql/item_sum.cc:
  Update Item::walk() to new interface
  Updates for new handler interace
sql/item_sum.h:
  Update Item::walk() to new interface
sql/key.cc:
  Updates for new handler interace
sql/log.cc:
  Mark all columns used for log tables
  Split options flag
  Ensured that second argument to trans_register_ha is a bool
sql/log_event.cc:
  Fixed comments to be withing 79 characters
  Use OPTION_KEEP_LOG instead of OPTION_STATUS_NO_TRANS_UPDATE to remove wrong warnings
  Updates for new handler interface
  Use 0x%lx instead of %p (portability problem)
sql/mysql_priv.h:
  Added OPTION_KEEP_LOG to indicate that we should replicate the binlog even on rollback
  Removed not used 'conds' argument to setup_tables
sql/mysqld.cc:
  Indentation fixes and removed old comment
sql/opt_range.cc:
  Update to new handler and bitmap interface.
  Fixed calls to cp_buffer_from_ref() and walk() (new argument).
  Create new temporary bitmaps for ror scans.
  (Needed because of handler changes and to get more accurate column bitmaps than before)
  Remove not needed file->ha_reset() call before file->close().
  Some trivial optimization and indentation fixes.
  Use Field->part_of_key_not_clustered() to check if field is part of a key, instead of looping over all key parts.
  
  Added flag 'in_ror_merged_scan' to allow ::get_next() to know that we need a special column bitmap to only fetch pointer to record.
  This is needed because ror scan uses the same TABLE object but different file objects, which creates problem for the column bitmap handling.
  (This is a temporary solution. A better one would be to allocate an own TABLE object for ROR scans)
  
  Optimized bitmap handling in ror scans:
  - Start bitmap at position 0, not 1
  - Use same bitmap size as in TABLE
  - Use table->read_set and table->write_set to create column bitmaps instead of looping over all fields in table
sql/opt_range.h:
  Added 'in_ror_merged_scan' to indicate if we are doing a ROR scan
  Added temporary column bitmaps used in ROR scans
sql/opt_sum.cc:
  Added get_ext_record_count() which is used in COUNT() optimization if handler has HA_HAS_RECORDS
  Note that we don't call this if handler has HA_STATS_RECORDS_IS_EXACT set.
sql/protocol.cc:
  We need to mark columns as readable in ::store() as we sometimes return default value for fields to the user
sql/records.cc:
  Updates for new handler interface
sql/set_var.cc:
  Handle splitting OPTION_STATUS_NO_TRANS_UPDATE to two flags
sql/share/errmsg.txt:
  Fixed wrong
sql/sp.cc:
  Mark that we are using all columns for the proc table
  Update call to setup_tables() to use new prototype
sql/sp_head.cc:
  Removed QQ comment
sql/spatial.cc:
  Removed wrong QQ comment
sql/sql_acl.cc:
  Mark that we need all columns for acl tables
  Supply memroot to some 'new' calls.
  Indentation fixes
sql/sql_base.cc:
  set_query_id removed
  Ensure we call ha_reset() at end of each statement
  Mark read columns in read_set and changed columns in write_set (Before all columns was marked in read set)
  Fixed marking of some columns that was not proplerly marked before
  Maintain in TABLE->merge_keys set of all keys that are used in some way
  Removed not used 'conds' argument from setup_tables()
  Remove not used setting of 'dupp_field' in insert_fields()
  Added missing FN_LIBCHAR in mysql_rm_tmp_tables()
  (This has probably caused us to not properly remove temporary files after crash)
sql/sql_bitmap.h:
  Added is_overlapping()
sql/sql_class.cc:
  Slow_logs was not properly initialized, which could maybe cause extra/lost entries in slow log.
  set_query_id -> mark_used_columns
  Simpler variable usage in pack_row()  (cleanup)
  Moved some variable declartion at start of function for better code readability
sql/sql_class.h:
  Added enum_mark_columns
  Updated comments
  Renamed dupp_field -> dup_field
  Added virtual function 'can_rollback_data()' to select_insert() to be used in CREATE ... SELECT to optimize use of OPTION_STATUS_NO_TRANS_UPDATE.
  (This fixes a bug in CREATE ... SELECT where we did give wrong warnings when using non transacational tables)
sql/sql_delete.cc:
  Updates to new handler interface
  Call table->mark_columns_needed_for_delete() to allow us to put additional columns in column usage maps if handler so requires.
  Call table->prepare_for_position() to tell handler that we are going to call ha_position().
  Removed call to free_io_cache(). (io_cache is now removed in ha_reset()).
  Fixed calls to setup_tables()
sql/sql_do.cc:
  Update call to setup_fields()
sql/sql_handler.cc:
  Tell handler tables to always read all columns.
  Use temporary column map when storing value in field for later index usage
sql/sql_help.cc:
  Makr all used fields to be read
  Update call to setup_fields()
sql/sql_insert.cc:
  Tell handler we are going to update the auto_increment column
  dupp_field -> dup_field
  Set column usage bits for timestamp field.
  Call table->mark_columns_needed_for_insert() and table->mark_auto_increment_column()
  Removed not used argument from mysql_prepare_insert_check_table().
  
  If we get an duplicate row on insert, change column map to read and write all columns while retrying the operatation.
  This is required by the definition of REPLACE and also ensures that fields that are only part of UPDATE are properly handled.
  This fixed a bug in NDB and REPLACE where REPLACE wrongly copied some column values from the replaced row.
  
  Setup new bitmaps for delayed insert rows
  Remove reseting of next_number_fields as it will be reset on next call to handler_insert()
  
  Fixed usage of thd->options and OPTION_STATUS_NO_TRANS_UPDATE.
  The issue was that one should not to reset this flag as it may be set by a previous statement.
  The way it was now used caused us to loose some warnings and get other wrong warnings when using non transactional tables mixed with transactional.
  I fixed it by introducing 'select_insert::can_rollback_data' to inform send_error() that the given statement can be rolled back (which in case of CREATE TABLE can always be done)
  Don't close tables created with CREATE ... SELECT but keep them in the table cache.
  
  Moved out MY_HOOKS from inside function (better readability)
sql/sql_load.cc:
  Update to use new handler and column marking interface
  Update using setup_tables()
sql/sql_olap.cc:
  Update calls to setup_tables
  Use enums instead of constants to setup_fields()
sql/sql_parse.cc:
  Handle OPTION_KEEP_LOG:
  - Set it on CREATE TEMPORARY TABLE / DROP TABLE
  - Reset it when OPTION_STATUS_NO_TRANS_UPDATE is reset
  - Don't set it for CREATE ... SELECT (this is handled in select_create class)
  Remove reseting of OPTION_STATUS_NO_TRANS_UPDATE in begin_trans() as this should already be reset.
  If in autocommit mode, reset OPTION_KEEP_LOG and OPTION_STATUS_NO_TRANS_UPDATE to not give warnings in future commands
sql/sql_partition.cc:
  Update walk() usage
  Trivial indentation fixes
sql/sql_plugin.cc:
  Mark all columns as used for plugins
sql/sql_prepare.cc:
  Added assert to find out hidden bugs in character_set_client (got an error in debug binary when this not set correctly)
  Updates for new handler interface
  Update calls to setup_fields()
sql/sql_repl.cc:
  Indentation fixes
sql/sql_select.cc:
  Update call to setup_tables() and setup_fields()
  Remove some old disabled code
  Update to new hadler interface
  Indentation cleanups
  Added column bitmaps for temporary tables.
  Remove updating of the removed slots in the Field class
  Added TABLE argument to cp_buffer_from_ref() (To be able to install temporary column maps)
  For internal temporary tables, use handler::write_row(), handler::delete_row() and handler::update_row() instead of handler::ha_xxxx() for faster execution.
sql/sql_select.h:
  Indentaition fixes.
  Install temporary column usage maps when needed
  Added TABLE element to cp_buffer_from_ref()
sql/sql_show.cc:
  Update to new handler interface
  Mark all columns used for internal tables.
  Style fixes.
  Added support for 'future' ROW_TYPE_PAGES.
  Don't allocate TMP_TABLE_PARAM with calloc. The 'init()' function will initialize the structure properly.
sql/sql_table.cc:
  Update to new handler interface
  Simple my_snprintf -> strmake()
  Changed some constants to defines
  Don't test for NULL in primary key (as we a couple of line above force the PRIMARY KEY to be NOT NULL)
  Change field->add_index to use field->flags & FIELD_IN_ADD_INDEX
  Mark all columns as used for ALTER TABLE
  Style fixes
  Update call to filesort()
sql/sql_trigger.h:
  Added friend functions to be able to test if triggers exists for table we are going to insert/update or delete in.
sql/sql_udf.cc:
  Mark all columns as used for udf system table.
sql/sql_union.cc:
  Update call to walk()
  Update to new handler interface
sql/sql_update.cc:
  Remove query_id argument from compare_record()
  Use column bitmaps instead of query_id.
  We can't use compare_records() to skip updates for handlers that returns a partial column set and the read_set doesn't cover all columns in the write set, because compare_record() can't in this case know if a not read column changed value.
  Update call to setup_fields()
  Using separate column read and write sets allows for easier checking of timestamp field was set by statement.
  Removed call to free_io_cache() as this is now done in ha_reset()
  Call table->mark_columns_needed_for_update() and table->prepare_for_position()
  Style fixes
sql/sql_view.cc:
  Style fixes
sql/table.cc:
  Remove implicitely include 'errno.h'
  Remove code for building normalized path, as this is now identical to 'path'
  Remove field->fieldnr
  Added update of field->part_of_key_not_clustered()
  Create column bitmaps in TABLE and TABLE_SHARE
  Don't setup a temporary MEM_ROOT object as a thread specific variable for the handler. Instead we send the to-be-used MEMROOT to get_new_handler()
  Update to new handler interface
  Update call to walk()
  Added new functions:
  - st_table::clear_column_bitmaps()
  - st_table::prepare_for_position()
  - st_table::mark_columns_used_by_index()
  - st_table::restore_column_maps_after_mark_index()
  - st_table::mark_columns_used_by_index_no_reset()
  - st_table::mark_auto_increment_column()
  - st_table::mark_columns_needed_for_delete()
  - st_table::mark_columns_needed_for_update()
  - st_table::mark_columns_needed_for_insert()
sql/table.h:
  Moved column usage bitmaps from handler to TABLE
  Added to TABLE_SHARE all_set and column_bitmap_size
  Added to TABLE merge_keys, bitmap_init_values, def_read_set, def_write_set, tmp_set, read_set and write_set.
  Declared all new table column bitmap functions
  Added TABLE functions column_bitmaps_set(), column_bitmaps_set_no_signal(), use_all_columns() and default_column_bitmaps()
  Added functions: tmp_use_all_columns() and tmp_restore_column_map() to temporarly switch column bitmaps
  Added functions: dbug_tmp_use_all_columns() and dbug_tmp_restore_column_map() to temporarly switch column bitmaps to avoid asserts in Field::store() and Field::val().
sql/tztime.cc:
  Mark all columns as used for timezone tables
storage/archive/ha_archive.cc:
  Update to new handler interface
storage/archive/ha_archive.h:
  Update to new handler interface
storage/blackhole/ha_blackhole.cc:
  Update to new handler interface
storage/blackhole/ha_blackhole.h:
  Update to new handler interface
  removed not needed flag HA_DUPP_POS
storage/csv/ha_tina.cc:
  Update to new handler interface
storage/csv/ha_tina.h:
  Update to new handler interface
storage/example/ha_example.cc:
  Update to new handler interface
storage/example/ha_example.h:
  Update to new handler interface
storage/heap/hp_extra.c:
  Added heap_reset() (Required by new handler interface)
storage/heap/hp_test2.c:
  Use heap_reset()
storage/myisam/ft_boolean_search.c:
  Fixed compiler warning
storage/myisam/mi_extra.c:
  Added mi_reset() (Required by new handler interface)
storage/myisam/mi_search.c:
  Fixed DBUG_PRINT messages to use 0x%lx instead of %lx
storage/myisam/mi_test2.c:
  Use mi_reset()
storage/myisam/myisampack.c:
  Use mi_reset()
storage/myisammrg/myrg_extra.c:
  Added myrg_reset() (Required by new handler interface)
unittest/mysys/base64.t.c:
  Include my_global.h
  Don't include implictely include file 'stdlib.h'
2006-06-04 18:52:22 +03:00
unknown
44de69cfdd Merge mysql.com:/home/psergey/tmp_merge3
into  mysql.com:/home/psergey/mysql-5.1-merge2


mysql-test/r/select.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/opt_range.cc:
  Manual merge
2006-05-13 22:40:26 +04:00
unknown
0e336304d0 Merge c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1-new
into  c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19010


mysql-test/r/ndb_dd_basic.result:
  Auto merged
mysql-test/r/ndb_partition_key.result:
  Auto merged
mysql-test/t/ndb_partition_key.test:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.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
2006-05-12 12:22:31 -04:00
unknown
4e3f4e970f BUG#19010: Fix issues with that ALTER TABLE from auto-partitioned NDB table doesn't work unless primary key exists on table.
mysql-test/r/ndb_bitfield.result:
  Test cases changes now that auto-partitioning is remembered in frm file
mysql-test/r/ndb_dd_basic.result:
  Test cases changes now that auto-partitioning is remembered in frm file
mysql-test/r/ndb_dd_disk2memory.result:
  Test cases changes now that auto-partitioning is remembered in frm file
mysql-test/r/ndb_gis.result:
  Test cases changes now that auto-partitioning is remembered in frm file
mysql-test/r/ndb_partition_key.result:
  New test cases for auto-partitioning change that was made to fix bug
mysql-test/r/rpl_ndb_UUID.result:
  Test cases changes now that auto-partitioning is remembered in frm file
mysql-test/r/rpl_ndb_dd_advance.result:
  Test cases changes now that auto-partitioning is remembered in frm file
mysql-test/t/ndb_partition_key.test:
  New test cases for auto-partitioning change that was made to fix bug
sql/partition_info.h:
  New boolean to keep track of auto partitioned or not
sql/sql_partition.cc:
  Ensure that auto-partitiong flag is reset when partitions are dropped, added, reorganised or coalesced.
  Ensure that auto-partitioned tables are altered into non-partitioned table when ALTER TABLE t1 engine=X
  is performed.
sql/sql_show.cc:
  Only print partition info for non-auto-partitioned tables
sql/sql_table.cc:
  Set auto partition flag when auto partitions are generated in create table
sql/table.cc:
  Fix reading of frm file where new auto-partition flag is introduced.
sql/table.h:
  New flag for auto partition on share object
sql/unireg.cc:
  Fix code for writing frm to also write autopartition flag at end of partition info, fix some length issues
  at the same time that was in this part that caused no problems since partition info always was the last info
  in the file.
2006-05-10 12:53:40 -04:00
unknown
3fa6432b09 BUG#17379 Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
Re-work best_access_path() and find_best() to reuse E(#rows(range access)) as
E(#rows(ref[_or_null](const) access) only when it is appropriate.
[This is the final cumulative patch]


mysql-test/r/select.result:
  BUG#17379: Testcase
mysql-test/r/subselect.result:
  BUG#17379: Updated test results
mysql-test/t/select.test:
  BUG#17379: Testcase
sql/opt_range.cc:
  BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
  Make range optimizer together with TABLE::quick_* also return TABLE::quick_n_ranges
sql/sql_select.cc:
  BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
  Re-work best_access_path() to reuse E(#rows(range access)) as
  E(#rows(ref[_or_null](const) access) only when it is appropriate.
sql/table.h:
  BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
  Make range optimizer together with TABLE::quick_* also return TABLE::quick_n_ranges
2006-05-10 17:40:20 +04:00
unknown
d50ae16569 Added support for key_block_size for key and table level (WL#602)
Added support for key_block_size to MyISAM.
Simplify interface to 'new Key' to make it easier to add new key options.
mysqld option --new is used to define where key options are printed.
(In 5.3 we should move all key options to after key part definition to avoid problem with reserved names)
Fixed some compiler warnings and a memory leak in ssl


include/my_base.h:
  Added flag to check if block size for key was secified
include/my_sys.h:
  Added new support function to round up to a power of two
include/myisam.h:
  Rename block_size -> block_size_index to avoid confusion with 'block_size'
include/violite.h:
  Added function to free memory after new_VioSSLAcceptorFd
  (Will rename all vio_ssl functions in a future changeset)
mysql-test/mysql-test-run.pl:
  Don't print port number info when we use --extern
mysql-test/r/myisam.result:
  Added test for key_block_size
mysql-test/t/myisam.test:
  Added test for key_block_size
mysys/mf_keycache.c:
  Simplify code
mysys/my_bit.c:
  Added new support function to round up to a power of two
sql/ha_myisam.cc:
  Tell MyISAM to use the specified key_block_size
  MyISAM also updates the global key_block_size from the used values.
sql/handler.cc:
  Added 'default_key_create_info' to be used as 'dummy' argument to 'new Key'
sql/handler.h:
  Added KEY_CREATE_INFO, to be used as for general options for KEY's
sql/item_func.h:
  Removed compiler warning
sql/lex.h:
  Added new symbol
sql/mysqld.cc:
  Fixed memory leak in ssl (new_VioSSLAcceptorFd)
sql/sql_class.h:
  Change 'new Key' to use KEY_CREATE_INFO instead of 'algoritm', parser, key_page_size.
  This makes it easier to add new key options in the future.
sql/sql_lex.h:
  Added key create options
sql/sql_parse.cc:
  Use new interface to 'new Key'
sql/sql_show.cc:
  Added support for key_block_size
  If --new is used, key options are printed after the key part definition.
sql/sql_table.cc:
  Use new interface to 'new Key'
  Add support for key_block_size
sql/sql_yacc.yy:
  Add support for key_block_size
  Allow key options before and after key_parts (In future they should be always after the key_part defintion)
  Use new interface to 'new Key'
sql/structs.h:
  Added block_size to keys
sql/table.cc:
  Remmeber and read key_block_size for table and key level
sql/table.h:
  Added default key_block_size for table
sql/unireg.cc:
  Remember key_block_size for key
storage/myisam/ft_eval.c:
  Set block_length to 0 to get default key page size
storage/myisam/ft_test1.c:
  Set block_length to 0 to get default key page size
storage/myisam/mi_check.c:
  block_size -> block_size_index
storage/myisam/mi_create.c:
  Added support for block size per key.
  Block size is rounded up to next power of two and enforced between MIN and MAX KEY_BLOCK_LENGTH.
  Align start of key block to start at an even offset of max_key_block_length to ensure key cache works good if all key pages are of same size.
storage/myisam/mi_open.c:
  block_size -> block_size_index
storage/myisam/mi_page.c:
  block_size -> block_size_index
storage/myisam/mi_test1.c:
  Set block_length to 0 to get default key page size
storage/myisam/mi_test2.c:
  Set block_length to 0 to get default key page size
storage/myisam/mi_test3.c:
  Set block_length to 0 to get default key page size
storage/myisam/myisamdef.h:
  block_size -> block_size_index to avoid confusion with 'block_size' in MySQL
  Added block_size as argument to MI_BLOCK_SIZE
  Added missing prototypes to get rid of compiler warnings
storage/myisam/myisampack.c:
  Removed compiler warning
  block_size -> block_size_index
vio/viosslfactories.c:
  Fixed memory leak in ssl (new_VioSSLAcceptorFd)
mysql-test/r/myisam-system.result:
  New BitKeeper file ``mysql-test/r/myisam-system.result''
mysql-test/t/myisam-system.test:
  New BitKeeper file ``mysql-test/t/myisam-system.test''
2006-05-03 15:59:17 +03:00
unknown
79cc1546b2 WL#2257 REFERENTIAL_CONSTRAINTS view
added I_S.REFARENTIAL_CONSTRAINTS table


mysql-test/r/information_schema.result:
  WL#2257 REFERENTIAL_CONSTRAINTS view
   result fix
mysql-test/r/information_schema_db.result:
  WL#2257 REFERENTIAL_CONSTRAINTS view
   result fix
mysql-test/r/information_schema_inno.result:
  WL#2257 REFERENTIAL_CONSTRAINTS view
   test case
mysql-test/t/information_schema_inno.test:
  WL#2257 REFERENTIAL_CONSTRAINTS view
   test case
sql/ha_innodb.cc:
  WL#2257 REFERENTIAL_CONSTRAINTS view
2006-05-02 16:31:39 +05:00
unknown
0d0e4c422f Merge mysql.com:/home/mydev/mysql-5.0-bug5390
into  mysql.com:/home/mydev/mysql-5.1-bug5390


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/share/charsets/Index.xml:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
sql/lock.cc:
  BUG#5390 - problems with merge tables
  Manual merge from 5.0.
2006-04-05 15:00:28 +02:00
unknown
6fa5591544 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug5390


sql/table.h:
  Auto merged
2006-04-05 11:38:16 +02:00
unknown
604e0535d7 Bug#18280 (RBR: Extreneous maps when writing to general_log and slow_log):
Filter out replication general_log and slow_log entirely from binary
log. Caching result of table share-specific tests.


mysql-test/r/binlog_row_drop_tmp_tbl.result:
  Result change
mysql-test/r/rpl_row_log.result:
  Result change
mysql-test/r/rpl_row_log_innodb.result:
  Result change
mysql-test/r/rpl_row_max_relay_size.result:
  Result change
sql/handler.cc:
  Refactoring code to support filtering many tables.
  Filtering out mysql.general_log and mysql.slow_log from binary log.
  Caching result from table share-specific tests.
sql/sql_class.cc:
  Correcting comment
sql/sql_parse.cc:
  Using binlog_query() instead of constructing Query_log_events
sql/table.cc:
  Adding variable to cache table check parts for row-based logging.
sql/table.h:
  Adding variable to cache table check parts for row-based logging.
2006-03-17 18:11:07 +01:00
unknown
40e371d2b6 Merge mysql.com:/home/bkroot/mysql-5.1-new
into  mysql.com:/home/bk/w3023-mysql-5.1-new


configure.in:
  Auto merged
mysql-test/r/rpl_row_create_table.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.h:
  Auto merged
2006-03-07 10:00:13 +01:00
unknown
6b81326c53 Merge mysql.com:/extern/mysql/5.0/generic/mysql-5.0
into  mysql.com:/extern/mysql/5.1/generic/mysql-5.1-new


libmysql/libmysql.c:
  Auto merged
mysql-test/r/binary.result:
  Auto merged
mysql-test/r/federated.result:
  Auto merged
mysql-test/r/func_math.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/heap.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/type_decimal.result:
  Auto merged
mysql-test/t/binary.test:
  Auto merged
mysql-test/t/federated.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/field_conv.cc:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
support-files/mysql.spec.sh:
  Manual merge. (use local)
2006-03-06 19:46:17 +01:00
unknown
cda64c11d7 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-bug-15229


mysql-test/r/join.result:
  Auto merged
mysql-test/t/join.test:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/sql_base.cc:
  SCCS merged
2006-03-06 11:41:19 +02:00
unknown
de1e87bbcd Fix for BUG#15229.
The cause of this bug was a design flaw due to which the list of natural
join columns was incorrectly computed and stored for nested joins that
are not natural joins, but are operands (possibly indirect) of nested joins.

The patch corrects the flaw in a such a way, that the result columns of a
table reference are materialized only if it is a leaf table (that is, only
if it is a view, stored table, or natural/using join).


mysql-test/r/join.result:
  Added test for BUG#15229 and uncommented failing test cases of
  BUG#15357 (now fixed by this patch).
mysql-test/t/join.test:
  Added test for BUG#15229 and uncommented failing test cases of
  BUG#15357 (now fixed by this patch).
sql/sql_base.cc:
  - Do not materialize the result columns of regular nested joins
    (that are not natural/using joins).
  - Moved most of the code that creates/adds new natural join column
    references to the method 'get_or_create_column_ref', and simplified
    'mark_common_columns'.
  - Replaced a call to 'get_or_create_column_ref' with 'get_natural_column_ref'
    where it is for sure all columns are alredy created.
sql/table.cc:
  - Modified the method 'get_or_create_column_ref' so that it adds itself
    the newly created natural join columns to the respective table reference.
sql/table.h:
  - Modified the method 'get_or_create_column_ref' so that it adds itself
    the newly created natural join columns to the respective table reference.
2006-03-02 11:50:15 +02:00
unknown
4e31551b92 Merge mysql.com:/home/bkroot/mysql-5.1-new
into  mysql.com:/home/bk/w3023-mysql-5.1-new


configure.in:
  Auto merged
BitKeeper/deleted/.del-sp_notembedded.test:
  Auto merged
mysql-test/extra/binlog_tests/binlog.test:
  Auto merged
mysql-test/extra/binlog_tests/blackhole.test:
  Auto merged
mysql-test/r/binlog_stm_ctype_cp932.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/log.h:
  Auto merged
sql/log_event.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.h:
  Auto merged
2006-02-28 10:06:58 +01:00
unknown
f7cf76fc80 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1


BitKeeper/deleted/.del-innodb_notembedded.test:
  Delete: mysql-test/t/innodb_notembedded.test
BitKeeper/deleted/.del-sp_notembedded.test:
  Delete: mysql-test/t/sp_notembedded.test
BitKeeper/deleted/.del-subselect_notembedded.test:
  Delete: mysql-test/t/subselect_notembedded.test
BitKeeper/deleted/.del-ctype_cp932_notembedded.result:
  Delete: mysql-test/r/ctype_cp932_notembedded.result
BitKeeper/deleted/.del-innodb_notembedded.result:
  Delete: mysql-test/r/innodb_notembedded.result
BitKeeper/deleted/.del-sp_notembedded.result:
  Delete: mysql-test/r/sp_notembedded.result
BitKeeper/deleted/.del-subselect_notembedded.result:
  Delete: mysql-test/r/subselect_notembedded.result
configure.in:
  Auto merged
include/mysql.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/emb_qcache.cc:
  Auto merged
libmysqld/embedded_priv.h:
  Auto merged
libmysqld/libmysqld.c:
  Auto merged
mysql-test/extra/binlog_tests/blackhole.test:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/mysqltest.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/query_cache_notembedded.result:
  Auto merged
mysql-test/r/sp-error.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
mysql-test/t/backup.test:
  Auto merged
mysql-test/t/compress.test:
  Auto merged
mysql-test/t/delayed.test:
  Auto merged
mysql-test/t/handler.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/mysql_client_test.test:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/query_cache_notembedded.test:
  Auto merged
mysql-test/t/read_only.test:
  Auto merged
mysql-test/t/skip_grants.test:
  Auto merged
mysql-test/t/sp-destruct.test:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/sp-threads.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/temp_table.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
mysql-test/t/wait_timeout.test:
  Auto merged
mysys/mf_dirname.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.h:
  Auto merged
sql/log_event.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_cursor.cc:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/tztime.h:
  Auto merged
storage/ndb/include/ndbapi/NdbDictionary.hpp:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
libmysqld/lib_sql.cc:
  Manual merge
mysql-test/extra/binlog_tests/binlog.test:
  Manual merge
mysql-test/extra/binlog_tests/ctype_cp932.test:
  No changes
mysql-test/r/binlog_stm_binlog.result:
  Manual merge
mysql-test/r/binlog_stm_ctype_cp932.result:
  No changes
mysql-test/t/innodb.test:
  Manual merge
mysql-test/t/view.test:
  Manual merge
mysys/my_bitmap.c:
  Manual merge
scripts/mysql_fix_privilege_tables.sql:
  Manual merge
sql/item.cc:
  Manual merge
sql/sql_cache.h:
  Manual merge
sql/sql_class.h:
  Manual merge
sql/sql_update.cc:
  Manual merge
2006-02-25 21:54:34 +02:00
unknown
f5f01b15e7 Fixed compiler warnings from gcc 4.0.2:
- Added empty constructors and virtual destructors to many classes and structs
- Removed some usage of the offsetof() macro to instead use C++ class pointers


configure.in:
  Added comment
ndb/include/ndbapi/NdbDictionary.hpp:
  Fixed compiler warnings from gcc 4.0.2
sql/field.cc:
  Fixed compiler warnings from gcc 4.0.2
sql/handler.h:
  Fixed compiler warnings from gcc 4.0.2
sql/item.h:
  Fixed compiler warnings from gcc 4.0.2
sql/item_cmpfunc.h:
  Fixed compiler warnings from gcc 4.0.2
sql/log_event.h:
  Fixed compiler warnings from gcc 4.0.2
sql/mysql_priv.h:
  Fixed compiler warnings from gcc 4.0.2
  For find_table_in_list I fixed it to use proper C++ class pointers instead of C style pointers
sql/opt_range.cc:
  Fixed compiler warnings from gcc 4.0.2
sql/parse_file.h:
  Fixed compiler warnings from gcc 4.0.2
sql/sp_rcontext.h:
  Fixed compiler warnings from gcc 4.0.2
sql/spatial.h:
  Fixed compiler warnings from gcc 4.0.2
sql/sql_base.cc:
  Fixed compiler warnings from gcc 4.0.2
sql/sql_cache.h:
  Fixed compiler warnings from gcc 4.0.2
sql/sql_class.h:
  Fixed compiler warnings from gcc 4.0.2
sql/sql_parse.cc:
  Fixed compiler warnings from gcc 4.0.2
  (Not pretty, but seams to work...)
sql/sql_select.h:
  Fixed compiler warnings from gcc 4.0.2
sql/sql_update.cc:
  Fixed compiler warnings from gcc 4.0.2
sql/table.h:
  Fixed compiler warnings from gcc 4.0.2
sql/tztime.cc:
  Fixed compiler warnings from gcc 4.0.2
sql/tztime.h:
  Fixed compiler warnings from gcc 4.0.2
2006-02-25 17:46:30 +02:00
unknown
d11aa8345d Merge mysqldev@production.mysql.com:my/mysql-5.1-release
into  mysql.com:/home/bk/w3023-mysql-5.1-new


mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_log.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test:
  Auto merged
mysql-test/r/binlog_row_insert_select.result:
  Auto merged
mysql-test/r/rpl_row_delayed_ins.result:
  Auto merged
mysql-test/t/rpl_sp.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
mysql-test/t/rpl_ndb_dd_basic.test:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_basic_11bugs.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_basic_2myisam.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_basic_3innodb.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_create_table.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_log.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_log_innodb.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_sp008.result:
  Merge with 5.1.7 release clone.
mysql-test/t/rpl_row_basic_11bugs.test:
  Merge with 5.1.7 release clone.
mysql-test/t/rpl_row_sp008.test:
  Merge with 5.1.7 release clone.
2006-02-24 16:31:38 +01:00
unknown
ab16adb7dd BUG#5390 - problems with merge tables
Merge from 4.1
2006-02-20 15:23:57 +01:00
unknown
42f8c2d2ea Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/alexi/dev/mysql-5.1-wl3148


sql/sql_show.cc:
  Auto merged
sql/table.h:
  Auto merged
2006-02-16 16:53:34 +03:00
unknown
99ea15c93f The patch adds PROCESSLIST information schema
mysql-test/r/information_schema.result:
  Fixing results after PROCESSLIST information schema is added.
mysql-test/r/information_schema_db.result:
  Fixing results after PROCESSLIST information schema is added.
mysql-test/t/information_schema.test:
  Test case to check PROCESSLIST information schema.
    (Note that selecting other fields from PROCESSLIST
    can make the test unstable).
sql/sql_show.cc:
  Code for PROCESSLIST information schema
sql/table.h:
  Added for PROCESSLIST informarion schema
2006-02-16 16:45:05 +03:00
unknown
738a1ca08d Merge mysql.com:/home/bkroot/mysql-5.1-new
into  mysql.com:/home/bk/w3023-mysql-5.1-new


mysql-test/extra/binlog_tests/ctype_cp932.test:
  Auto merged
mysql-test/r/binlog_row_blackhole.result:
  Auto merged
mysql-test/r/binlog_stm_ctype_cp932.result:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log.h:
  Auto merged
sql/log_event.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/parse_file.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/log_event.cc:
  Merge with mysql-5.1-new
2006-02-16 08:46:45 +01:00
unknown
41f7d13853 WL#3023 (Use locks in a statement-like manner):
Table maps are now written on aquiring locks to tables and released
  at the end of each logical statement.


mysql-test/extra/binlog_tests/ctype_cp932.test:
  Disabling cleanup code
mysql-test/r/binlog_row_blackhole.result:
  Result change
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Result change
mysql-test/r/binlog_stm_ctype_cp932.result:
  Result change
mysql-test/r/rpl_row_charset.result:
  Result change
mysql-test/r/rpl_row_create_table.result:
  Result change
mysql-test/t/rpl_row_create_table.test:
  Binlog position change
sql/handler.cc:
  Writing table map after external_lock()
sql/handler.h:
  Adding class for table operation hooks.
sql/log.cc:
  Adding binlog_write_table_map() to THD.
  Removing write_table_map() from MYSQL_LOG.
sql/log.h:
  Minor interface changes to move table map writing.
sql/log_event.cc:
  Removing pre-allocation of memory for buffers.
  Allowing ULONG_MAX as table id denoting an event to ignore (only used to transfer flags).
  Adding code to collect tables while seeing table maps and lock collected tables
  when seeing a binrow event.
  Debriding code as a result of the above changes.
sql/log_event.h:
  Minor interface changes.
sql/mysql_priv.h:
  Adding hooks argument to create_table_from_items().
sql/parse_file.cc:
  Minor fix to avoid crash in debug printout.
sql/rpl_rli.h:
  Adding list of tables to lock to RLI structure.
sql/slave.cc:
  Using list of tables to lock from RLI structure.
sql/sql_acl.cc:
  Removing redundant pending events flush.
sql/sql_base.cc:
  Moving pending event flush.
  Using flag to guard to clear statement transaction only if this is the original
  open tables state.
sql/sql_class.cc:
  Adding flag for open tables state.
  Removing redundant pending events flushes.
  Write a dummy event to indicate that the tables to lock should be emptied
  on the slave.
sql/sql_class.h:
  Adding open tables state flags.
  Adding binlog_write_table_map() function to THD.
  Changes to select_create() to support new locking scheme.
sql/sql_insert.cc:
  Adding rollback of statement transaction on error. It can now contain
  events after locking tables.
sql/sql_load.cc:
  Removing redundant pending event flush.
sql/sql_table.cc:
  Adding hooks argument to create_table_from_items().
  Calling prelock hook before starting to lock tables.
sql/sql_update.cc:
  Removing a compiler warning.
sql/table.h:
  Minor changes.
2006-02-16 08:30:53 +01:00
unknown
752cadd453 manual merge
mysql-test/r/events.result:
  Auto merged
mysql-test/t/events.test:
  Auto merged
sql/event.h:
  Auto merged
sql/event_executor.cc:
  Auto merged
sql/event_timed.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_acl.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
2006-02-14 17:05:36 +01:00
unknown
8d4f74be2d - final fixes for bug#16431 (Events: An event which alters itself disappears)
- fix for bug#16423 (Events: SHOW CREATE EVENT doesn't work)
- this Changeset commits makes CREATE/UPDATE/DELETE EVENT real DDL statements
  by committing the currently open transaction before they are executed.
- this Changeset also fixes a trailing space problem since the very early days
  of the internal cron
- adds sophisticated checking of whether mysql.event was tampered accidentally
  or with purpose by an user.
- adds a lot of inline function documentation - documents everything left
  uncodumented
- INTERVAL_XXXX to XXX in I_S.EVENTS.INTERVAL_FIELD

WL#1034 (Internal CRON)


mysql-test/r/events.result:
  update result
mysql-test/t/events.test:
  add test cases for SHOW CREATE EVENT
  add test cases where the structure of mysql.event is changed and error reporting in this case
sql/event.cc:
  - do a lot more checking on mysql.event whether it's valid
    introduced generic function table_check_intact() which can be used also
    for checking whether a system table (mysql.*) has been tampered by user
    and report an error in this case. The checking is quite strict, thus
    maybe some mechanism can be added later that loosens this like some
    session variable, for instance, i_am_aware_that_i_can_damage_my_data
    so the table will be opened nevertheless we think that it's not valid.
  - add evex_show_create_event(THD *thd, sp_name *spn, LEX_STRING definer)
  - document a loooot. not a single function left undocumented.
sql/event.h:
  - add evex_show_create_event(THD *thd, sp_name *spn, LEX_STRING definer)
  - change get_show_create_event() to get_create_event()
  - add TABLE_FIELD_W_TYPE used by table_check_intact()
  - add event_timed::sql_mode so it can be used by show create event. currently
    always 0, will be fixed by a patch for another bug. At least makes the code
    of show create event complete.
sql/event_executor.cc:
  - add evex_check_system_tables() that checks on boot and event
    main thread startup that mysql.db and mysql.user tables are correct.
  - document everything!
sql/event_priv.h:
  remove a line
sql/event_timed.cc:
  - implement SHOW CREATE EVENT
  - document undocumented functions!
sql/share/errmsg.txt:
  - fix an error message and add two new
sql/sql_acl.cc:
  - add mysql.db table definition to use by table_check_intact()
  - exchange some of the positions by numbers from mysql.db to enum names (see sql_acl.h)
sql/sql_acl.h:
  - define the structure of mysql.db table
sql/sql_parse.cc:
  - handle SQLCOM_SHOW_CREATE_EVENT
  - end the current transaction becase CREATE/UPDATE/DELETE EVENT is a DDL
    statement
sql/sql_show.cc:
  - remove interval_type_to_name
  - use common function event_reconstruct_interval_expression()
    that reconstructs the expression given at create/alter, to some
    extent - interval of 2:62 MINUTE_SECOND will be reconstructed as
    interval of 3:02 MINUTE_SECOND!
sql/sql_yacc.yy:
  init the definer of event_timed also when doing SHOW CREATE EVENT
  because it's needed for checking into mysql.event
sql/table.cc:
  - remove stale code. only mysql.event should be a 'system_table'
  - add table_check_intact() to check the consistency of a table.
    mostly usable with mysql.xxx tables.
sql/table.h:
  - export TABLE_FIELD_W_TYPE and table_check_intact() which are used for 
    checking the structure of a table. mostly usable for mysql.xxx tables.
2006-02-14 16:20:48 +01:00
unknown
02576c95d1 Merge mysql.com:/home/kostja/mysql/tmp_merge
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge


mysql-test/r/information_schema_db.result:
  Auto merged
sql/ha_archive.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/information_schema.result:
  SCCS merged
2006-02-07 15:26:58 +03:00
unknown
0e88bff6cb Merge mysql.com:/home/mydev/mysql-4.1-bug5390
into  mysql.com:/home/mydev/mysql-5.0-bug5390


mysql-test/r/lock.result:
  Auto merged
mysql-test/t/lock.test:
  Auto merged
sql/lock.cc:
  BUG#5390 - problems with merge tables
  Manual merge
sql/table.h:
  BUG#5390 - problems with merge tables
  Manual merge
2006-02-06 15:15:44 +01:00
unknown
d297a221fe Merge mysql.com:/home/kostja/mysql/tmp_merge
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge


BitKeeper/etc/ignore:
  auto-union
configure.in:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/ndb/ndbcluster.sh:
  Auto merged
mysql-test/r/rpl_sp.result:
  Auto merged
mysql-test/r/sp-error.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/type_float.result:
  Auto merged
mysql-test/t/rpl_sp.test:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/ft_update.c:
  Auto merged
storage/ndb/include/logger/LogHandler.hpp:
  Auto merged
storage/ndb/include/logger/Logger.hpp:
  Auto merged
storage/ndb/include/mgmapi/mgmapi.h:
  Auto merged
storage/ndb/include/mgmcommon/ConfigRetriever.hpp:
  Auto merged
storage/ndb/src/common/logger/FileLogHandler.cpp:
  Auto merged
storage/ndb/src/common/logger/LogHandler.cpp:
  Auto merged
storage/ndb/src/common/logger/Logger.cpp:
  Auto merged
storage/ndb/src/common/logger/SysLogHandler.cpp:
  Auto merged
storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp:
  Auto merged
storage/ndb/src/common/util/SocketServer.cpp:
  Auto merged
storage/ndb/src/kernel/main.cpp:
  Auto merged
storage/ndb/src/kernel/vm/Configuration.cpp:
  Auto merged
storage/ndb/src/kernel/vm/Configuration.hpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
storage/ndb/src/mgmsrv/Services.cpp:
  Auto merged
storage/ndb/src/mgmsrv/Services.hpp:
  Auto merged
storage/ndb/src/mgmsrv/main.cpp:
  Auto merged
storage/ndb/tools/ndb_size.pl:
  Auto merged
zlib/Makefile.am:
  Auto merged
mysql-test/r/information_schema.result:
  SCCS merged
mysql-test/t/information_schema.test:
  Manual merge.
sql/ha_archive.cc:
  Manual merge.
sql/share/errmsg.txt:
  SCCS merged
tests/mysql_client_test.c:
  Manual merge.
2006-02-02 23:27:06 +03:00
unknown
9be61bbc02 some fixes from review of WL1359.
fix up test cases.


mysql-test/r/information_schema.result:
  update result for INFORMATION_SCHEMA.FILES
mysql-test/r/information_schema_db.result:
  update result for INFORMATION_SCHEMA.FILES
sql/ha_ndbcluster.cc:
  in fill_files_table, use my_snprintf instead of snprintf
sql/sql_show.cc:
  correct DBUG_ENTER for fill_schema_files
sql/table.h:
  add SCH_FILES to information schema enum
2006-02-02 00:47:08 +11:00
unknown
c3542cebf9 fix for bug#16642 (Events: No INFORMATION_SCHEMA.EVENTS table)
post-review change - use pointer instead of copy on the stack.
WL#1034 (Internal CRON)
 This patch adds INFORMATION_SCHEMA.EVENTS table with the following format:
  EVENT_CATALOG  - MYSQL_TYPE_STRING  (Always NULL)
  EVENT_SCHEMA   - MYSQL_TYPE_STRING  (the database)
  EVENT_NAME     - MYSQL_TYPE_STRING  (the name)
  DEFINER        - MYSQL_TYPE_STRING  (user@host)
  EVENT_BODY     - MYSQL_TYPE_STRING  (the body from mysql.event)
  EVENT_TYPE     - MYSQL_TYPE_STRING  ("ONE TIME" | "RECURRING")
  EXECUTE_AT     - MYSQL_TYPE_TIMESTAMP (set for "ONE TIME" otherwise NULL)
  INTERVAL_VALUE - MYSQL_TYPE_LONG    (set for RECURRING otherwise NULL)
  INTERVAL_FIELD - MYSQL_TYPE_STRING  (set for RECURRING otherwise NULL)
  SQL_MODE       - MYSQL_TYPE_STRING  (for now NULL)
  STARTS         - MYSQL_TYPE_TIMESTAMP (starts from mysql.event)
  ENDS           - MYSQL_TYPE_TIMESTAMP (ends from mysql.event)
  STATUS         - MYSQL_TYPE_STRING  (ENABLED | DISABLED)
  ON_COMPLETION  - MYSQL_TYPE_STRING  (NOT PRESERVE | PRESERVE)
  CREATED        - MYSQL_TYPE_TIMESTAMP
  LAST_ALTERED   - MYSQL_TYPE_TIMESTAMP
  LAST_EXECUTED  - MYSQL_TYPE_TIMESTAMP
  EVENT_COMMENT  - MYSQL_TYPE_STRING

  SQL_MODE is NULL for now, because the value is still not stored in mysql.event .
Support will be added as a fix for another bug.

 This patch also adds SHOW [FULL] EVENTS [FROM db] [LIKE pattern]
1. SHOW EVENTS shows always only the events on the same user,
   because the PK of mysql.event is (definer, db, name) several 
   users may have event with the same name -> no information disclosure.
2. SHOW FULL EVENTS - shows the events (in the current db as SHOW EVENTS)
   of all users. The user has to have PROCESS privilege, if not then
   SHOW FULL EVENTS behave like SHOW EVENTS.
3. If [FROM db] is specified then this db is considered.
4. Event names can be filtered with LIKE pattern.
  SHOW EVENTS returns table with the following columns, which are subset of
  the data which is returned by SELECT * FROM I_S.EVENTS
   Db
   Name
   Definer 
   Type
   Execute at
   Interval value
   Interval field 
   Starts 
   Ends
   Status


mysql-test/lib/init_db.sql:
  change the PK - (definer, db, name)
  quicker searches when SHOW EVENTS;
  allow also different users to have events with the same name -> 
  no information disclosure
mysql-test/r/events.result:
  result of new tests
mysql-test/r/information_schema.result:
  result of new tests
mysql-test/r/information_schema_db.result:
  result of new tests
mysql-test/r/system_mysql_db.result:
  result of new tests
mysql-test/t/events.test:
  new tests for information_schema.events
scripts/mysql_create_system_tables.sh:
  change the PK of mysql.event to (definer, db, name)
scripts/mysql_fix_privilege_tables.sql:
  change the PK of mysql.event to (definer, db, name)
sql/event.cc:
  pass around the definer of the event because of the new PK
  which is (definer, db, name). It's needed for index searching.
sql/event.h:
  - make enum evex_table_field again public so it can be used
  in sql_show.cc
  - make created and modified ulonglong, because they should be such
  - make public evex_open_event_table so it can be used in sql_show.cc
sql/event_executor.cc:
  - cosmetics
sql/event_priv.h:
  - moved enum evex_table_field and evex_open_event_table()
    to event.h (made them therefore public)
sql/event_timed.cc:
  - in event_timed::init_definer() always fill this.definer with
    the concatenated value of definer_user@definer_host. Makes
    later the work easier.
  - pass around the definer wherever is needed for searching 
    (new prototype of evex_db_find_evex_aux)
sql/mysqld.cc:
  - add counter for SHOW EVENTS
sql/sql_lex.h:
  - register SHOW EVENTS as command
sql/sql_parse.cc:
  - handle SCH_EVENTS (I_S.EVENTS like SCH_TRIGGERS)
  - make additional check in case of SHOW EVENTS (check for EVENT on
    the current database. if it is null check_access() gives appropriate
    message back.
sql/sql_show.cc:
  - add INFORMATION_SCHEMA.EVENTS and SHOW EVENTS
  - I_S.EVENTS.SQL_MODE is NULL for now -> not implemented. Trudy
    asked to be added so bug #16642 can be completely closed. There
    is another bug report which will fix the lack of storage of
    SQL_MODE during event creation.
sql/sql_yacc.yy:
  - always call event_timed::init_definer() when CREATE/ALTER/DROP
    EVENT but not when just compiling the body of the event because
    in this case this operation is not needed, it takes memory and
    CPU time and at the end the result is not used. event_timed::definer
    is used only on SQLCOM_CREATE/ALTER/DROP_EVENT execution not on
    statement compilation.
  - add SHOW [FULL] EVENTS [FROM db] [LIKE pattern]
    in case of FULL and the user has PROCESS privilege then he will see
    also others' events in the current database, otherwise the output
    is the same as of SHOW EVENTS. Because the events are per DB only
    the events from the current database are shown. pattern is applied
    against event name. FROM db is self explanatory.
sql/table.h:
  add SCH_EVENTS as part of INFORMATION_SCHEMA
2006-01-30 13:15:23 +01:00
unknown
ef0cd2f58a information_schema_db.result, information_schema.result:
Fix test result.
table.h, sql_show.cc:
  Put I_S tables in lexical order.


sql/sql_show.cc:
  Put I_S tables in lexical order.
sql/table.h:
  Put I_S tables in lexical order.
mysql-test/r/information_schema.result:
  Fix test result.
mysql-test/r/information_schema_db.result:
  Fix test result.
2006-01-28 19:44:51 -06:00
unknown
333b1f8594 Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema(2nd ver)
Fill schema tables with data before filesort if it's necessary


mysql-test/r/information_schema.result:
  Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema(2nd ver)
    test result
mysql-test/t/information_schema.test:
  Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema(2nd ver)
    test case
2006-01-24 16:48:19 +04:00
unknown
cfbb86034d Merge mysql.com:/home/mydev/mysql-4.0-bug5390
into  mysql.com:/home/mydev/mysql-4.1-bug5390


sql/table.h:
  Auto merged
mysql-test/r/lock.result:
  BUG#5390 - problems with merge tables
  Manual merge from 4.0.
mysql-test/t/lock.test:
  BUG#5390 - problems with merge tables
  Manual merge from 4.0.
sql/lock.cc:
  BUG#5390 - problems with merge tables
  Manual merge from 4.0.
2006-01-23 19:19:29 +01:00
unknown
15ecf9228a BUG#5390 - problems with merge tables
After-fix optimizations proposed and finally
implemented by Monty.


mysql-test/r/lock.result:
  BUG#5390 - problems with merge tables
  After-fix optimizations proposed and finally
  implemented by Monty.
  Additional test results.
mysql-test/t/lock.test:
  BUG#5390 - problems with merge tables
  After-fix optimizations proposed and finally
  implemented by Monty.
  Additional tests.
sql/lock.cc:
  BUG#5390 - problems with merge tables
  After-fix optimizations proposed and finally
  implemented by Monty.
  get_lock_data() gets a flag for storing the lock
  positions in the new TABLE elements.
  mysql_lock_remove() can now remove a lock faster
  and more precisely as it has needed info in TABLE now.
  mysql_unlock_read_tables() and mysql_lock_merge() must 
  now adjust the new elements of TABLE when modifying locks.
  mysql_lock_have_duplicate() can now work faster on
  the existing lock as the positions in the lock
  arrays are known for each table.
  get_lock_data() assigns the new TABLE elements 
  on request of the new flag.
sql/table.h:
  BUG#5390 - problems with merge tables
  After-fix optimizations proposed and finally
  implemented by Monty.
  Additional elements of TABLE.
2006-01-23 19:12:29 +01:00
unknown
41536fcefe WL1019: complete patch. Reapplied patch to the clean
tree to get rid of multiple typos in CS comments and
unify the patch.


configure.in:
  CSV is compiled in by default now
include/my_base.h:
  add new ha_extra flag for the log tables
mysql-test/include/im_check_os.inc:
  we should only run im tests if csv is on for now: im relies
  on mysqld options available only in csv build.
mysql-test/include/system_db_struct.inc:
  check log tables structure
mysql-test/lib/init_db.sql:
  create log tables when running tests.
mysql-test/mysql-test-run.pl:
  Add old logs flag to IM tests. As IM could only deal with
  old logs (this feature is not needed with log tables)
mysql-test/r/connect.result:
  update result
mysql-test/r/csv.result:
  update result
mysql-test/r/im_utils.result:
  update result
mysql-test/r/information_schema.result:
  update result
mysql-test/r/mysqlcheck.result:
  update result
mysql-test/r/show_check.result:
  update result
mysql-test/r/system_mysql_db.result:
  update result
mysql-test/t/connect.test:
  disable test if CSV engine is not in: result depends on the
  presence of CSV-based log tables
mysql-test/t/csv.test:
  add tests for concurrent insert (the functionality is added
  to CSV in this patch)
mysql-test/t/information_schema.test:
  disable test if CSV engine is not in: result depends on the
  presence of CSV-based log tables
mysql-test/t/mysqlcheck.test:
  disable test if CSV engine is not in: result depends on the
  presence of CSV-based log tables
mysql-test/t/show_check.test:
  disable test if CSV engine is not in: result depends on the
  presence of CSV-based log tables
mysql-test/t/system_mysql_db.test:
  disable test if CSV engine is not in: result depends on the
  presence of CSV-based log tables
mysql-test/t/system_mysql_db_fix.test:
  disable test if CSV engine is not in: result depends on the
  presence of CSV-based log tables
scripts/mysql_create_system_tables.sh:
  new system tables: slow_log and general_log
scripts/mysql_fix_privilege_tables.sql:
  add new log tables: use an SP to create them for
  non-csv build to work fine.
sql/ha_myisam.cc:
  move locking-related checks to the hanlder
sql/ha_myisam.h:
  new function declared
sql/handler.h:
  new virtual function is added: we should check for handler-related
  locking issues in the handler
sql/lock.cc:
  from now on we check for handler-related locking issues
  in the handler itself rather then in lock.cc
sql/log.cc:
  Add log tables support, refactoring: there are log event
  handlers with common interface. They are used by the LOGGER
  class, which is responsible for their initialization, cleanup
  and managment. Logging to the tables provided by one of the
  log event handler types.
sql/log.h:
  declare new log classes
sql/log_event.cc:
  convert old logging routines calls to use new API
sql/mysql_priv.h:
  define common log routines and objects
sql/mysqld.cc:
  Add support for the log tables. Their initalization, cleanup
  and specific options.
sql/share/errmsg.txt:
  add new error messages for the log tables
sql/slave.cc:
  convert old logging routines calls to use new API
sql/sql_base.cc:
  TABLE objects used by the logger should be skipped
  during refreshes (as log tables are always opened
  and locked). fix table_is_used to skip them.  This
  is needed for FLUSH LOGS to work
sql/sql_db.cc:
  convert old logging routines calls to use new API
sql/sql_delete.cc:
  fix TRUNCATE to work with log tables
sql/sql_parse.cc:
  command_name is now an array of LEX_STRINGs
sql/sql_prepare.cc:
  convert old logging routines calls to use new API
sql/sql_show.cc:
  convert old logging routines calls to use new API
sql/sql_table.cc:
  don't reoped the log tables for admin purposes
sql/table.cc:
  mark log tables as such during the open
sql/table.h:
  add log-related info
storage/csv/ha_tina.cc:
  add support for concurrent insert (see bk commit - 5.1 tree
  (petr:1.1910) for standalone patch), add log tables-specific
  csv table handling.
storage/csv/ha_tina.h:
  enable concurrent insert for CSV, add log table flag
mysql-test/r/log_tables.result:
  New BitKeeper file ``mysql-test/r/log_tables.result''
mysql-test/t/log_tables.test:
  New BitKeeper file ``mysql-test/t/log_tables.test''
2006-01-19 05:56:06 +03:00
unknown
19bbb7cc85 WL #2604: Partition Management
Optimised version of ADD/DROP/REORGANIZE partitions for
non-NDB storage engines.
New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions
Quite a few bug fixes


include/thr_lock.h:
  New method to downgrade locks from TL_WRITE_ONLY
  Possibility to upgrade lock while aborting locks
mysql-test/r/ndb_autodiscover.result:
  Fix for lowercase and that all NDB tables are now partitioned
mysql-test/r/ndb_bitfield.result:
  Fix for lowercase and that all NDB tables are now partitioned
mysql-test/r/ndb_gis.result:
  Fix for lowercase and that all NDB tables are now partitioned
mysql-test/r/ndb_partition_key.result:
  New test case
mysql-test/r/partition.result:
  New test case
mysql-test/r/partition_error.result:
  New test case
mysql-test/r/partition_mgm_err.result:
  Fix of test case results
mysql-test/t/disabled.def:
  partition_03ndb still has bug
mysql-test/t/ndb_partition_key.test:
  New test cases for new functionality and bugs
mysql-test/t/partition.test:
  New test cases for new functionality and bugs
mysql-test/t/partition_error.test:
  New test cases for new functionality and bugs
mysql-test/t/partition_mgm_err.test:
  New test cases for new functionality and bugs
mysys/thr_lock.c:
  New method to downgrade TL_WRITE_ONLY locks
  Possibility to specify if locks are to be upgraded at abort locks
sql/ha_archive.cc:
  New handlerton methods
sql/ha_berkeley.cc:
  New handlerton methods
sql/ha_blackhole.cc:
  New handlerton methods
sql/ha_federated.cc:
  New handlerton methods
sql/ha_heap.cc:
  New handlerton methods
sql/ha_innodb.cc:
  New handlerton methods
sql/ha_myisam.cc:
  New handlerton methods
sql/ha_myisammrg.cc:
  New handlerton methods
sql/ha_ndbcluster.cc:
  New handlerton methods
  Moved out packfrm and unpackfrm methods
  Adapted many parts to use table_share instead of table->s
  Ensured that .ndb file uses filename and not tablename
  according to new encoding of names (WL 1324)
  All NDB tables are partitioned and set up partition info
  Fixed such that tablenames use tablenames and not filenames in NDB
  NDB uses auto partitioning for ENGINE=NDB tables
  Warning for very large tables
  Set RANGE data
  Set LIST data
  New method to set-up partition info
  Set Default number of partitions flag
  Set linear hash flag
  Set node group array
  Set number of fragments
  Set max rows
  Set tablespace names
  New method to get number of partitions of table to use at open table
sql/ha_ndbcluster.h:
  Removed partition_flags and alter_table_flags from handler class
  A couple of new and changed method headers
sql/ha_ndbcluster_binlog.cc:
  Use new method headers
sql/ha_partition.cc:
  New handlerton methods
  Lots of new function headers
  Use #P# as separator between table name and partition name and
  #SP# as separator between partition name and subpartition name
  Use filename encoding for files both of table name part and of
  partition name parts
  New method to drop partitions based on partition state
  New method to rename partitions based on partition state
  New methods to optimize, analyze, check and repair partitions
  New methods to optimize, analyze, check and repair table
  Helper method to create new partition, open it and external lock
  it, not needed to lock it internally since no one else knows about
  it yet.
  Cleanup method at error for new partitions
  New methods to perform bulk of work at ADD/REORGANIZE partitions
  (change_partitions, copy_partitions)
sql/ha_partition.h:
  New methods and variables
  A few dropped ones and a few changed ones
sql/handler.cc:
  Handlerton interface changes
  New flag to open_table_from_share
sql/handler.h:
  New alter_table_flags
  New partition flags
  New partition states
  More states for default handling
  Lots of new, dropped and changed interfaces
sql/lex.h:
  Added REBUILD and changed name of REORGANISE to REORGANIZE
sql/lock.cc:
  Method to downgrade locks
  Able to specify if locks upgraded on abort locks
sql/log.cc:
  New handlerton methods
sql/mysql_priv.h:
  Lots of new interfaces
sql/share/errmsg.txt:
  Lots of new, dropped and changed error messages
sql/sql_base.cc:
  Adapted to new method headers
  New method to abort and upgrade lock
  New method to close open tables and downgrade lock
  New method to wait for completed table
sql/sql_lex.h:
  New flags
sql/sql_partition.cc:
  Return int instead of bool in get_partition_id
  More defaults handling
  Make use of new mem_alloc_error method
  More work on function headers
  Changes to generate partition syntax to cater for intermediate
  partition states
  Lots of new code with large comments describing new features for
  Partition Management:
  ADD/DROP/REORGANIZE/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions
sql/sql_show.cc:
  Minors
sql/sql_table.cc:
  Moved a couple of methods
  New methods to copy create lists and key lists
  for use with mysql_prepare_table
  New method to write frm file
  New handling of handlers with auto partitioning
  Fix CREATE TABLE LIKE
  Moved code for ADD/DROP/REORGANIZE partitions
  Use handlerton method for alter_table_flags
sql/sql_yacc.yy:
  More memory alloc error checks
  New syntax for REBUILD, ANALYZE, CHECK, OPTIMIZE, REPAIR partitions
sql/table.cc:
  Fix length of extra part to be 4 bytes
  Partition state introduced in frm file
sql/table.h:
  Partition state introduced
sql/unireg.cc:
  Partition state introduced
  Default partition
storage/csv/ha_tina.cc:
  New handlerton methods
storage/example/ha_example.cc:
  New handlerton methods
storage/ndb/include/kernel/ndb_limits.h:
  RANGE DATA
storage/ndb/include/kernel/signaldata/AlterTable.hpp:
  New interfaces in ALTER TABLE towards NDB kernel
storage/ndb/include/kernel/signaldata/DiAddTab.hpp:
  New section
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp:
  Lots of new parts of table description
storage/ndb/include/kernel/signaldata/LqhFrag.hpp:
  tablespace id specified in LQHFRAGREQ
storage/ndb/include/ndbapi/NdbDictionary.hpp:
  Lots of new methods in NDB dictionary
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp:
  Lots of new variables in table description
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Lots of new variables in table description
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  Lots of new variables in table description
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  New error insertion
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
  a few extra jam's
storage/ndb/src/ndbapi/NdbBlob.cpp:
  Changes to definition of blob tables
storage/ndb/src/ndbapi/NdbDictionary.cpp:
  Lots of new stuff in NDB dictionary
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Lots of new stuff in NDB dictionary
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  Lots of new stuff in NDB dictionary
storage/ndb/test/ndbapi/test_event.cpp:
  removed use of methods no longer in existence
storage/ndb/tools/restore/Restore.cpp:
  Renamed variable
2006-01-17 08:40:00 +01:00
unknown
31d3c88cae WL#2506: Information Schema tables for PARTITIONing
added I_S 'PARTITIONS' table
2006-01-10 19:44:04 +04:00
unknown
e6cf611fe2 Merge newbox:mysql-5.1-ppruning-r4
into  pylon.mylan:/home/psergey/mysql-5.1-26dec-merge


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
sql/handler.h:
  Merge
2005-12-26 14:56:15 +03:00
unknown
a4a1bb0e2f WL#2985 "Partition Pruning": post-review fixes:
- Added more comments.
- Added a RANGE_OPT_PARAM::remove_jump_scans flag that disables construction of index_merge
  SEL_TREEs that represent unusable conditions like "key1part1<c1 OR key2part2<c2"
- make prune_partitions() function handle the case where range analysis produces a list of 
  index_merge trees (it turned out that this is possible, appropriate test case added).
- Other small fixes.


mysql-test/r/partition_pruning.result:
  WL#2985 "Partition Pruning": post-review fixes: more test cases
mysql-test/t/partition_pruning.test:
  WL#2985 "Partition Pruning": post-review fixes: more test cases
sql/opt_range.cc:
  WL#2985 "Partition Pruning": post-review fixes:
  - Added more comments.
  - Fix the debug printouts
  - Added a RANGE_OPT_PARAM::remove_jump_scans flag that disables construction of index_merge
    SEL_TREEs that represent unusable conditions like "key1part1<c1 OR key2part2<c2"
  - make prune_partitions() function handle the case where range analysis produces a list of 
    index_merge trees (it turned out that this is possible, appropriate test case added).
sql/sql_partition.cc:
  WL#2985 "Partition Pruning": post-review fixes: make requested edits in comments.
sql/table.h:
  WL#2985 "Partition Pruning": post-review fixes: added bool TABLE::no_partitions_used
  (this change was missed when making the original cset)
2005-12-26 08:40:09 +03:00
unknown
69221bba59 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  zim.(none):/home/brian/mysql/cluster-5.1


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
2005-12-22 01:12:40 -08:00
unknown
67c96c78f5 This patch does the following:
1) Fixes breakage in embedded server build for XMLPath push.
2) Hides PARTITION engine from view.
3) Add ENGINES information schema (and it should now be clear from this patch on how to turn any show command into an information schema).


libmysqld/Makefile.am:
  Fix for embedded server to build.
mysql-test/r/information_schema.result:
  Fix for additional information_schema
mysql-test/r/information_schema_db.result:
  Fix for adding additional engines information schema.
mysql-test/t/information_schema.test:
  Added test to make sure that engines information schema works.
sql/ha_partition.cc:
  Made PARTITION hidden in information schema.
sql/sql_parse.cc:
  Added additional case for engine information schema.
sql/sql_show.cc:
  Code for ENGINES information schema.
sql/sql_yacc.yy:
  Extended grammer to support new ENGINES information schema
sql/table.h:
  Comment on dependency in information schema.
libmysqld/item_xmlfunc.cc:
  New BitKeeper file ``libmysqld/item_xmlfunc.cc''
2005-12-22 01:07:47 -08:00
unknown
09346e6e2d WL#1012: All changes as one single changeset.
This includes both code and test cases.


BitKeeper/deleted/.del-ctype_ucs_binlog.result~280d136b1a0bcf17:
  Delete: mysql-test/r/ctype_ucs_binlog.result
BitKeeper/deleted/.del-rpl_delete_all.result~7c050d592614b3f:
  Delete: mysql-test/r/rpl_delete_all.result
BitKeeper/deleted/.del-rpl000013-slave.opt~18266ad8a2403e8d:
  Delete: mysql-test/t/rpl000013-slave.opt
BitKeeper/deleted/.del-rpl_delete_all.test~700a1490277780e0:
  Delete: mysql-test/t/rpl_delete_all.test
mysql-test/extra/binlog_tests/binlog.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/blackhole.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/ctype_cp932.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/drop_temp_table.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/insert_select-binlog.test:
  Import patch wl1012.patch
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_ddl.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_deadlock.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_err_ignoredtable.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_flsh_tbls.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_loaddata_m.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_log.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_multi_query.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_reset_slave.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_stm_000001.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_stm_EE_err.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_stm_charset.test:
  Import patch wl1012.patch
mysql-test/extra/rpl_tests/rpl_user_variables.test:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_binlog.result:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_blackhole.result:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_ctype_cp932.result:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_ctype_ucs.result:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_drop_tmp_tbl.result:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_insert_select.result:
  Import patch wl1012.patch
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
  Import patch wl1012.patch
mysql-test/r/rpl_000012.result:
  Import patch wl1012.patch
mysql-test/r/rpl_000015.result:
  Import patch wl1012.patch
mysql-test/r/rpl_deadlock_innodb.result:
  Import patch wl1012.patch
mysql-test/r/rpl_flushlog_loop.result:
  Import patch wl1012.patch
mysql-test/r/rpl_loaddata_s.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_000001.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_EE_err.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_charset.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_ddl.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_err_ignoredtable.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_flsh_tbls.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_loaddata_m.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_log.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_max_relay_size.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_multi_query.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_mystery22.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_reset_slave.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_rewrt_db.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_sp.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_timezone.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_until.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_user_variables.result:
  Import patch wl1012.patch
mysql-test/r/rpl_stm_view.result:
  Import patch wl1012.patch
mysql-test/t/binlog_row_binlog-master.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_000012.test:
  Import patch wl1012.patch
mysql-test/t/rpl_000015-slave.sh:
  Import patch wl1012.patch
mysql-test/t/rpl_000015.slave-mi:
  Import patch wl1012.patch
mysql-test/t/rpl_000015.test:
  Import patch wl1012.patch
mysql-test/t/rpl_deadlock_innodb-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_flushlog_loop-master.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_flushlog_loop-master.sh:
  Import patch wl1012.patch
mysql-test/t/rpl_flushlog_loop-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_flushlog_loop-slave.sh:
  Import patch wl1012.patch
mysql-test/t/rpl_flushlog_loop.test:
  Import patch wl1012.patch
mysql-test/t/rpl_loaddata_s-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_loaddata_s.test:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_000001-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_err_ignoredtable-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_loaddata_m-master.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_log-master.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_log-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_mystery22.test:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_rewrt_db-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_rewrt_db.test:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_sp-master.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_sp-slave.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_sp.test:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_timezone-master.opt:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_timezone-slave.opt:
  Import patch wl1012.patch
BUILD/SETUP.sh:
  Import patch wl1012.patch
Makefile.am:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_timezone.test:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_until.test:
  Import patch wl1012.patch
mysql-test/t/rpl_stm_view.test:
  Import patch wl1012.patch
client/Makefile.am:
  Import patch wl1012.patch
client/client_priv.h:
  Import patch wl1012.patch
client/mysqlbinlog.cc:
  Import patch wl1012.patch
configure.in:
  Import patch wl1012.patch
include/Makefile.am:
  Import patch wl1012.patch
include/base64.h:
  Import patch wl1012.patch
include/config-win.h:
  Import patch wl1012.patch
include/my_base.h:
  Import patch wl1012.patch
include/my_global.h:
  Import patch wl1012.patch
mysql-test/Makefile.am:
  Import patch wl1012.patch
mysql-test/mysql-test-run.pl:
  Import patch wl1012.patch
mysql-test/mysql-test-run.sh:
  Import patch wl1012.patch
mysql-test/r/date_formats.result:
  Import patch wl1012.patch
mysql-test/r/flush_block_commit.result:
  Import patch wl1012.patch
mysql-test/r/innodb.result:
  Import patch wl1012.patch
mysql-test/r/rpl000017.result:
  Import patch wl1012.patch
mysql-test/r/rpl_change_master.result:
  Import patch wl1012.patch
mysql-test/r/rpl_commit_after_flush.result:
  Import patch wl1012.patch
mysql-test/r/rpl_create_database.result:
  Import patch wl1012.patch
mysql-test/r/rpl_do_grant.result:
  Import patch wl1012.patch
mysql-test/r/rpl_loaddata.result:
  Import patch wl1012.patch
mysql-test/r/rpl_log_pos.result:
  Import patch wl1012.patch
mysql-test/r/rpl_multi_delete.result:
  Import patch wl1012.patch
mysql-test/r/rpl_multi_update.result:
  Import patch wl1012.patch
mysql-test/r/rpl_openssl.result:
  Import patch wl1012.patch
mysql-test/r/rpl_replicate_do.result:
  Import patch wl1012.patch
mysql-test/r/rpl_rotate_logs.result:
  Import patch wl1012.patch
mysql-test/r/rpl_server_id1.result:
  Import patch wl1012.patch
mysql-test/r/rpl_server_id2.result:
  Import patch wl1012.patch
mysql-test/r/rpl_temporary.result:
  Import patch wl1012.patch
mysql-test/r/user_var-binlog.result:
  Import patch wl1012.patch
mysql-test/t/create_select_tmp.test:
  Import patch wl1012.patch
mysql-test/t/date_formats.test:
  Import patch wl1012.patch
mysql-test/t/disabled.def:
  Import patch wl1012.patch
mysql-test/t/innodb.test:
  Import patch wl1012.patch
mysql-test/t/mysqlbinlog.test:
  Import patch wl1012.patch
mysql-test/t/mysqlbinlog2.test:
  Import patch wl1012.patch
mysql-test/t/rpl000002.test:
  Import patch wl1012.patch
mysql-test/t/rpl000006.test:
  Import patch wl1012.patch
mysql-test/t/rpl000013.test:
  Import patch wl1012.patch
mysql-test/t/rpl000017.test:
  Import patch wl1012.patch
mysql-test/t/rpl_auto_increment.test:
  Import patch wl1012.patch
mysql-test/t/rpl_change_master.test:
  Import patch wl1012.patch
mysql-test/t/rpl_commit_after_flush.test:
  Import patch wl1012.patch
mysql-test/t/rpl_create_database.test:
  Import patch wl1012.patch
mysql-test/t/rpl_do_grant.test:
  Import patch wl1012.patch
mysql-test/t/rpl_drop.test:
  Import patch wl1012.patch
mysql-test/t/rpl_empty_master_crash.test:
  Import patch wl1012.patch
mysql-test/t/rpl_failed_optimize.test:
  Import patch wl1012.patch
mysql-test/t/rpl_heap.test:
  Import patch wl1012.patch
mysql-test/t/rpl_insert_id.test:
  Import patch wl1012.patch
mysql-test/t/rpl_insert_ignore.test:
  Import patch wl1012.patch
mysql-test/t/rpl_loaddata.test:
  Import patch wl1012.patch
mysql-test/t/rpl_log_pos.test:
  Import patch wl1012.patch
mysql-test/t/rpl_multi_delete.test:
  Import patch wl1012.patch
mysql-test/t/rpl_multi_update.test:
  Import patch wl1012.patch
mysql-test/t/rpl_multi_update2.test:
  Import patch wl1012.patch
mysql-test/t/rpl_multi_update3.test:
  Import patch wl1012.patch
mysql-test/t/rpl_openssl.test:
  Import patch wl1012.patch
mysql-test/t/rpl_redirect.test:
  Import patch wl1012.patch
mysql-test/t/rpl_relayrotate.test:
  Import patch wl1012.patch
mysql-test/t/rpl_replicate_do.test:
  Import patch wl1012.patch
mysql-test/t/rpl_rotate_logs.test:
  Import patch wl1012.patch
mysql-test/t/rpl_server_id1.test:
  Import patch wl1012.patch
mysql-test/t/rpl_sp_effects.test:
  Import patch wl1012.patch
mysql-test/t/rpl_temporary.test:
  Import patch wl1012.patch
mysql-test/t/rpl_trigger.test:
  Import patch wl1012.patch
mysql-test/t/sp.test:
  Import patch wl1012.patch
mysql-test/t/user_var-binlog.test:
  Import patch wl1012.patch
mysys/Makefile.am:
  Import patch wl1012.patch
mysys/base64.c:
  Import patch wl1012.patch
sql/Makefile.am:
  Import patch wl1012.patch
sql/ha_innodb.cc:
  Import patch wl1012.patch
sql/ha_innodb.h:
  Import patch wl1012.patch
sql/ha_partition.cc:
  Import patch wl1012.patch
sql/handler.cc:
  Import patch wl1012.patch
sql/handler.h:
  Import patch wl1012.patch
sql/item_sum.cc:
  Import patch wl1012.patch
sql/log.cc:
  Import patch wl1012.patch
sql/log_event.cc:
  Import patch wl1012.patch
sql/log_event.h:
  Import patch wl1012.patch
sql/mysql_priv.h:
  Import patch wl1012.patch
sql/mysqld.cc:
  Import patch wl1012.patch
sql/rpl_filter.h:
  Import patch wl1012.patch
sql/set_var.cc:
  Import patch wl1012.patch
sql/share/errmsg.txt:
  Import patch wl1012.patch
sql/slave.cc:
  Import patch wl1012.patch
sql/slave.h:
  Import patch wl1012.patch
sql/sp.cc:
  Import patch wl1012.patch
sql/sp_head.cc:
  Import patch wl1012.patch
sql/sql_acl.cc:
  Import patch wl1012.patch
sql/sql_base.cc:
  Import patch wl1012.patch
sql/sql_class.cc:
  Import patch wl1012.patch
sql/sql_class.h:
  Import patch wl1012.patch
sql/sql_delete.cc:
  Import patch wl1012.patch
sql/sql_insert.cc:
  Import patch wl1012.patch
sql/sql_lex.h:
  Import patch wl1012.patch
sql/sql_list.h:
  Import patch wl1012.patch
sql/sql_load.cc:
  Import patch wl1012.patch
sql/sql_parse.cc:
  Import patch wl1012.patch
sql/sql_plugin.cc:
  Import patch wl1012.patch
sql/sql_rename.cc:
  Import patch wl1012.patch
sql/sql_repl.h:
  Import patch wl1012.patch
sql/sql_select.cc:
  Import patch wl1012.patch
sql/sql_show.cc:
  Import patch wl1012.patch
sql/sql_table.cc:
  Import patch wl1012.patch
sql/sql_udf.cc:
  Import patch wl1012.patch
sql/sql_union.cc:
  Import patch wl1012.patch
sql/sql_update.cc:
  Import patch wl1012.patch
sql/sql_yacc.yy:
  Import patch wl1012.patch
sql/table.cc:
  Import patch wl1012.patch
sql/table.h:
  Import patch wl1012.patch
storage/innobase/include/lock0lock.h:
  Import patch wl1012.patch
storage/innobase/include/row0mysql.h:
  Import patch wl1012.patch
storage/innobase/include/row0vers.h:
  Import patch wl1012.patch
storage/innobase/lock/lock0lock.c:
  Import patch wl1012.patch
storage/innobase/row/row0mysql.c:
  Import patch wl1012.patch
storage/innobase/row/row0sel.c:
  Import patch wl1012.patch
storage/innobase/row/row0vers.c:
  Import patch wl1012.patch
2005-12-22 06:39:02 +01:00
unknown
5459c9709e Merge xiphis.org:/home/antony/work2/mysql-5.1
into  xiphis.org:/home/antony/work3/mysql-5.1-plugable-2


configure.in:
  Auto merged
mysql-test/r/bdb.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/bdb.test:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/ha_archive.cc:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_sum.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_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_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/sql_table.cc:
  SCCS merged
2005-12-21 10:26:39 -08:00
unknown
613dd50a33 Finalize storage engine plugins
Give BerkeleyDB savepoints
Remove "enum db_type" from most of the code


storage/example/ha_example.h:
  Rename: sql/examples/ha_example.h -> storage/example/ha_example.h
storage/csv/ha_tina.h:
  Rename: sql/examples/ha_tina.h -> storage/csv/ha_tina.h
config/ac-macros/storage.m4:
  if hton name is "no", then we don't install it as a builtin
configure.in:
  pluggable changes
include/plugin.h:
  version field
mysql-test/r/bdb.result:
  savepoint results copied from innodb test
mysql-test/r/information_schema.result:
  PLUGINS information schema
mysql-test/r/information_schema_db.result:
  PLUGINS information schema
mysql-test/t/bdb.test:
  savepoint test copied from innodb test
sql/Makefile.am:
  tina and example are not here anymore
sql/authors.h:
  minor tweek
sql/ha_archive.cc:
  remove unwanted handlerton entries
sql/ha_berkeley.cc:
  remove unwanted handlerton entries
  support for savepoints
  changes to show logs
sql/ha_blackhole.cc:
  remove unwanted handlerton entries
sql/ha_federated.cc:
  remove unwanted handlerton entries
sql/ha_heap.cc:
  remove unwanted handlerton entries
sql/ha_innodb.cc:
  remove unwanted handlerton entries
  changes for show status
sql/ha_myisam.cc:
  remove unwanted handlerton entries
sql/ha_myisammrg.cc:
  remove unwanted handlerton entries
sql/ha_ndbcluster.cc:
  remove unwanted handlerton entries
  changes to stat_print
sql/ha_partition.cc:
  remove unwanted handlerton entries
  bye bye enum db_type
sql/ha_partition.h:
  bye bye enum db_type
sql/handler.cc:
  remove unwanted handlerton entries
  bye bye enum db_type
sql/handler.h:
  remove unwanted handlerton entries
  bye bye enum db_type
  changes to stat_print_fn
sql/item_sum.cc:
  bye bye enum db_type
sql/log.cc:
  remove unwanted handlerton entries
sql/mysql_priv.h:
  bye bye enum db_type
sql/mysqld.cc:
  bye bye enum db_type
  reorder plugin initialization
sql/set_var.cc:
  bye bye enum db_type
sql/set_var.h:
  bye bye enum db_type
sql/sql_base.cc:
  bye bye enum db_type
sql/sql_cache.cc:
  bye bye enum db_type
sql/sql_class.h:
  bye bye enum db_type
sql/sql_delete.cc:
  bye bye enum db_type
sql/sql_insert.cc:
  bye bye enum db_type
sql/sql_lex.h:
  show plugin
sql/sql_parse.cc:
  bye bye enum db_type
sql/sql_partition.cc:
  bye bye enum db_type
sql/sql_plugin.cc:
  loadable storage engines
sql/sql_plugin.h:
  loadable storage engines
sql/sql_rename.cc:
  bye bye enum db_type
sql/sql_select.cc:
  bye bye enum db_type
sql/sql_show.cc:
  SHOW PLUGIN
  PLUGINS information schema
  changes to show engines
sql/sql_table.cc:
  bye bye enum db_type
sql/sql_view.cc:
  bye bye enum db_type
sql/sql_view.h:
  bye bye enum db_type
sql/sql_yacc.yy:
  bye bye enum db_type
sql/table.cc:
  bye bye enum db_type
sql/table.h:
  bye bye enum db_type
sql/unireg.cc:
  bye bye enum db_type
storage/csv/ha_tina.cc:
  make tina into a loadable plugin
storage/example/ha_example.cc:
  make into a plugin
storage/csv/Makefile.am:
  New BitKeeper file ``storage/csv/Makefile.am''
storage/example/Makefile.am:
  New BitKeeper file ``storage/example/Makefile.am''
2005-12-21 10:18:40 -08:00
unknown
f1ac6bb975 Merge mysql.com:/home/timka/mysql/src/5.0-2486
into  mysql.com:/home/timka/mysql/src/5.1-dbg


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_acl.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
sql/sql_base.cc:
  SCCS merged
sql/table.cc:
  SCCS merged
2005-12-07 10:47:43 +02:00
unknown
e486fe1ff1 WL#2486 - natural/using joins according to SQL:2003
Post-review fixes that simplify the way access rights
are checked during name resolution and factor out all
entry points to check access rights into one single
function.


sql/item.cc:
  Simplfied find_field_in_table - factored out all acces right checks
  into a separate function.
sql/mysql_priv.h:
  Simplified the way we control whether to perform access right
  checks for columns.
sql/sql_acl.cc:
  - Added new functon check_column_grant_in_table_ref that serves as a single
    point of entry to check access rights during name resolution for different
    kinds of table references.
  - Moved check_grant_column_in_sctx to sql_acl.cc where it
    logically belongs.
  - Removed the parameter check_grants - it is checked before
    calling the function.
sql/sql_acl.h:
  - Added new function check_column_grant_in_table_ref.
  - Made check_grant_column_in_sctx available to other modules.
sql/sql_base.cc:
  - Factored out all code that check access rights for columns during
    name resolution into one function - check_column_grant_in_table_ref.
  - Moved check_grant_column_in_sctx to sql_acl.cc where it
    logically belongs.
  - Removed the parameter check_grants - it is checked before
    calling the function.
sql/table.cc:
  Removed code that duplicates the functionality of
  check_column_grant_in_table_ref, and called directly
  that function.
sql/table.h:
  check_grants method is replaced by more general
  check_column_grant_in_table_ref.
2005-11-30 21:27:11 +02:00
unknown
4fd41f7c0b WL#2486 - Natural/using join according to SQL:2003.
Post-review fixes according to Monty's review.


sql/item.h:
  Unite all code that stores and restores the state of a name resolution context
  into a class to represent the state, and methods to save/restore that
  state.
sql/mysql_priv.h:
  Reorder parameters so that length is after the name of a field,
  and database is before table name.
sql/sql_acl.cc:
  Reorder parameters so that length is after the name of a field,
  and database is before table name.
sql/sql_base.cc:
  * Reorder parameters so that length is after the name of a field,
    and database is before table name.
  * Added new method - Field_iterator_table_ref::get_natural_column_ref
    to avoid unnecessary code when it is knwon that no new columns will
    be created when accessing natural join columns.
sql/sql_insert.cc:
  Unite all code that stores and restores the state of a name resolution context
  into a class to represent the state, and methods to save/restore that
  state.
sql/sql_lex.cc:
  Removed obsolete comment.
sql/sql_lex.h:
  Return error from push_contex() if there is no memory.
sql/sql_list.h:
  Extended base_list_iterator, List_iterator, and List_iterator_fast with an
  empty constructor, and init() methods, so that one doesn't have to construct
  a new iterator object every time one needs to iterate over a new list.
sql/sql_parse.cc:
  Moved common functionality from the parser into one function, and renamed
  the function to better reflect what it does.
sql/sql_yacc.yy:
  Moved common functionality from the parser into one function, and renamed
  the function to better reflect what it does.
sql/table.cc:
  * Extended base_list_iterator, List_iterator, and List_iterator_fast with an
    empty constructor, and init() methods, so that one doesn't have to construct
    a new iterator object every time one needs to iterate over a new list.
  * Added new method Field_iterator_table_ref::get_natural_column_ref to be
    used in cases when it is known for sure that no new columns should be
    created.
sql/table.h:
  - column_ref_it no longer allocated for each new list of columns
  - new method get_natural_join_column for faster/simpler access
    to natural join columns.
2005-11-28 21:57:50 +02:00
unknown
f631b361b6 Table definition cache, part 2
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
  object and open a handler to the table object

Other noteworthy changes:
- In TABLE_SHARE the most common strings are now LEX_STRING's
- Better error message when table is not found
- Variable table_cache is now renamed 'table_open_cache'
- New variable 'table_definition_cache' that is the number of table defintions that will be cached
- strxnmov() calls are now fixed to avoid overflows
- strxnmov() will now always add one end \0 to result
- engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
- After creating a field object one must call field->init(table) before using it

- For a busy system this change will give you:
 - Less memory usage for table object
 - Faster opening of tables (if it's has been in use or is in table definition cache)
 - Allow you to cache many table definitions objects
 - Faster drop of table


mysql-test/mysql-test-run.sh:
  Fixed some problems with --gdb option
  Test both with socket and tcp/ip port that all old servers are killed
mysql-test/r/flush_table.result:
  More tests with lock table with 2 threads + flush table
mysql-test/r/information_schema.result:
  Removed old (now wrong) result
mysql-test/r/innodb.result:
  Better error messages (thanks to TDC patch)
mysql-test/r/merge.result:
  Extra flush table test
mysql-test/r/ndb_bitfield.result:
  Better error messages (thanks to TDC patch)
mysql-test/r/ndb_partition_error.result:
  Better error messages (thanks to TDC patch)
mysql-test/r/query_cache.result:
  Remove tables left from old tests
mysql-test/r/temp_table.result:
  Test truncate with temporary tables
mysql-test/r/variables.result:
  Table_cache -> Table_open_cache
mysql-test/t/flush_table.test:
  More tests with lock table with 2 threads + flush table
mysql-test/t/merge.test:
  Extra flush table test
mysql-test/t/multi_update.test:
  Added 'sleep' to make test predictable
mysql-test/t/query_cache.test:
  Remove tables left from old tests
mysql-test/t/temp_table.test:
  Test truncate with temporary tables
mysql-test/t/variables.test:
  Table_cache -> Table_open_cache
mysql-test/valgrind.supp:
  Remove warning that may happens becasue threads dies in different order
mysys/hash.c:
  Fixed wrong DBUG_PRINT
mysys/mf_dirname.c:
  More DBUG
mysys/mf_pack.c:
  Better comment
mysys/mf_tempdir.c:
  More DBUG
  Ensure that we call cleanup_dirname() on all temporary directory paths.
  
  If we don't do this, we will get a failure when comparing temporary table
  names as in some cases the temporary table name is run through convert_dirname())
mysys/my_alloc.c:
  Indentation fix
sql/examples/ha_example.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/examples/ha_example.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/examples/ha_tina.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/examples/ha_tina.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/field.cc:
  Update for table definition cache:
  - Field creation now takes TABLE_SHARE instead of TABLE as argument
    (This is becasue field definitions are now cached in TABLE_SHARE)
    When a field is created, one now must call field->init(TABLE) before using it
  - Use s->db instead of s->table_cache_key
  - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE
  - make_field() takes TABLE_SHARE as argument instead of TABLE
  - move_field() -> move_field_offset()
sql/field.h:
  Update for table definition cache:
  - Field creation now takes TABLE_SHARE instead of TABLE as argument
    (This is becasue field definitions are now cached in TABLE_SHARE)
    When a field is created, one now must call field->init(TABLE) before using it
  - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE
  - make_field() takes TABLE_SHARE as argument instead of TABLE
  - move_field() -> move_field_offset()
sql/ha_archive.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_archive.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_berkeley.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Changed name of argument create() to not hide internal 'table' variable.
  table->s  -> table_share
sql/ha_berkeley.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_blackhole.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_blackhole.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_federated.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Fixed comments
  Remove index variable and replace with pointers (simple optimization)
  move_field() -> move_field_offset()
  Removed some strlen() calls
sql/ha_federated.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_heap.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Simplify delete_table() and create() as the given file names are now without extension
sql/ha_heap.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_innodb.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_innodb.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_myisam.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Remove not needed fn_format()
  Fixed for new table->s structure
sql/ha_myisam.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_myisammrg.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Don't set 'is_view' for MERGE tables
  Use new interface to find_temporary_table()
sql/ha_myisammrg.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Added flag HA_NO_COPY_ON_ALTER
sql/ha_ndbcluster.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Fixed wrong calls to strxnmov()
  Give error HA_ERR_TABLE_DEF_CHANGED if table definition has changed
  drop_table -> intern_drop_table()
  table->s -> table_share
  Move part_info to TABLE
  Fixed comments & DBUG print's
  New arguments to print_error()
sql/ha_ndbcluster.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_partition.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  We can't set up or use part_info when creating handler as there is not yet any table object
  New ha_intialise() to work with TDC (Done by Mikael)
sql/ha_partition.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Got set_part_info() from Mikael
sql/handler.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  ha_delete_table() now also takes database as an argument
  handler::ha_open() now takes TABLE as argument
  ha_open() now calls ha_allocate_read_write_set()
  Simplify ha_allocate_read_write_set()
  Remove ha_deallocate_read_write_set()
  Use table_share (Cached by table definition cache)
sql/handler.h:
  New table flag: HA_NO_COPY_ON_ALTER (used by merge tables)
  Remove ha_deallocate_read_write_set()
  get_new_handler() now takes TABLE_SHARE as argument
  ha_delete_table() now gets database as argument
sql/item.cc:
  table_name and db are now LEX_STRING objects
  When creating fields, we have now have to call field->init(table)
  move_field -> move_field_offset()
sql/item.h:
  tmp_table_field_from_field_type() now takes an extra paramenter 'fixed_length' to allow one to force usage of CHAR
   instead of BLOB
sql/item_cmpfunc.cc:
  Fixed call to tmp_table_field_from_field_type()
sql/item_create.cc:
  Assert if new not handled cast type
sql/item_func.cc:
  When creating fields, we have now have to call field->init(table)
  dummy_table used by 'sp' now needs a TABLE_SHARE object
sql/item_subselect.cc:
  Trivial code cleanups
sql/item_sum.cc:
  When creating fields, we have now have to call field->init(table)
sql/item_timefunc.cc:
  Item_func_str_to_date::tmp_table_field() now replaced by call to
   tmp_table_field_from_field_type() (see item_timefunc.h)
sql/item_timefunc.h:
  Simply tmp_table_field()
sql/item_uniq.cc:
  When creating fields, we have now have to call field->init(table)
sql/key.cc:
  Added 'KEY' argument to 'find_ref_key' to simplify code
sql/lock.cc:
  More debugging
  Use create_table_def_key() to create key for table cache
  Allocate TABLE_SHARE properly when creating name lock
  Fix that locked_table_name doesn't test same table twice
sql/mysql_priv.h:
  New functions for table definition cache
  New interfaces to a lot of functions.
  New faster interface to find_temporary_table() and close_temporary_table()
sql/mysqld.cc:
  Added support for table definition cache of size 'table_def_size'
  Fixed som calls to strnmov()
  Changed name of 'table_cache' to 'table_open_cache'
sql/opt_range.cc:
  Use new interfaces
  Fixed warnings from valgrind
sql/parse_file.cc:
  Safer calls to strxnmov()
  Fixed typo
sql/set_var.cc:
  Added variable 'table_definition_cache'
  Variable table_cache renamed to 'table_open_cache'
sql/slave.cc:
  Use new interface
sql/sp.cc:
  Proper use of TABLE_SHARE
sql/sp_head.cc:
  Remove compiler warnings
  We have now to call field->init(table)
sql/sp_head.h:
  Pointers to parsed strings are now const
sql/sql_acl.cc:
  table_name is now a LEX_STRING
sql/sql_base.cc:
  Main implementation of table definition cache
  (The #ifdef's are there for the future when table definition cache will replace open table cache)
  Now table definitions are cached indepndent of open tables, which will speed up things when a table is in use at once from several places
  Views are not yet cached; For the moment we only cache if a table is a view or not.
  
  Faster implementation of find_temorary_table()
  Replace 'wait_for_refresh()' with the more general function 'wait_for_condition()'
  Drop table is slightly faster as we can use the table definition cache to know the type of the table
sql/sql_cache.cc:
  table_cache_key and table_name are now LEX_STRING
  'sDBUG print fixes
sql/sql_class.cc:
  table_cache_key is now a LEX_STRING
  safer strxnmov()
sql/sql_class.h:
  Added number of open table shares (table definitions)
sql/sql_db.cc:
  safer strxnmov()
sql/sql_delete.cc:
  Use new interface to find_temporary_table()
sql/sql_derived.cc:
  table_name is now a LEX_STRING
sql/sql_handler.cc:
  TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
sql/sql_insert.cc:
  TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
sql/sql_lex.cc:
  Make parsed string a const (to quickly find out if anything is trying to change the query string)
sql/sql_lex.h:
  Make parsed string a const (to quickly find out if anything is trying to change the query string)
sql/sql_load.cc:
  Safer strxnmov()
sql/sql_parse.cc:
  Better error if wrong DB name
sql/sql_partition.cc:
  part_info moved to TABLE from TABLE_SHARE
  Indentation changes
sql/sql_select.cc:
  Indentation fixes
  Call field->init(TABLE) for new created fields
  Update create_tmp_table() to use TABLE_SHARE properly
sql/sql_select.h:
  Call field->init(TABLE) for new created fields
sql/sql_show.cc:
  table_name is now a LEX_STRING
  part_info moved to TABLE
sql/sql_table.cc:
  Use table definition cache to speed up delete of tables
  Fixed calls to functions with new interfaces
  Don't use 'share_not_to_be_used'
  Instead of doing openfrm() when doing repair, we now have to call
  get_table_share() followed by open_table_from_share().
  Replace some fn_format() with faster unpack_filename().
  Safer strxnmov()
  part_info is now in TABLE
  Added Mikaels patch for partition and ALTER TABLE
  Instead of using 'TABLE_SHARE->is_view' use 'table_flags() & HA_NO_COPY_ON_ALTER
sql/sql_test.cc:
  table_name and table_cache_key are now LEX_STRING's
sql/sql_trigger.cc:
  TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
  safer strxnmov()
  Removed compiler warnings
sql/sql_update.cc:
  Call field->init(TABLE) after field is created
sql/sql_view.cc:
  safer strxnmov()
  Create common TABLE_SHARE object for views to allow us to cache if table is a view
sql/structs.h:
  Added SHOW_TABLE_DEFINITIONS
sql/table.cc:
  Creation and destruct of TABLE_SHARE objects that are common for many TABLE objects
  
  The table opening process now works the following way:
  - Create common TABLE_SHARE object
  - Read the .frm file and unpack it into the TABLE_SHARE object
  - Create a TABLE object based on the information in the TABLE_SHARE
    object and open a handler to the table object
  
  open_table_def() is written in such a way that it should be trival to add parsing of the .frm files in new formats
sql/table.h:
  TABLE objects for the same database table now share a common TABLE_SHARE object
  In TABLE_SHARE the most common strings are now LEX_STRING's
sql/unireg.cc:
  Changed arguments to rea_create_table() to have same order as other functions
  Call field->init(table) for new created fields
sql/unireg.h:
  Added OPEN_VIEW
strings/strxnmov.c:
  Change strxnmov() to always add end \0
  This makes usage of strxnmov() safer as most of MySQL code assumes that strxnmov() will create a null terminated string
2005-11-23 22:45:02 +02:00
unknown
41de6f9a7c Merge mysql.com:/home/mysql_src/mysql-5.0
into  mysql.com:/home/mysql_src/mysql-5.1-merge-of-5.0 (not all files are good,
I'll fix; I'll ask some devs to check their part)


BitKeeper/etc/ignore:
  auto-union
include/my_global.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/mi_key.c:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbImpl.hpp:
  Auto merged
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
configure.in:
  merge
mysql-test/r/ps_1general.result:
  merge ("ul", will fix)
sql/examples/ha_tina.cc:
  merge
sql/ha_innodb.cc:
  merge
sql/handler.h:
  merge
sql/log.cc:
  merge
sql/set_var.cc:
  merge
sql/share/errmsg.txt:
  merge (bad, will fix)
sql/sql_show.cc:
  merge (bad, will fix)
sql/sql_yacc.yy:
  merge
storage/ndb/src/ndbapi/NdbRecAttr.cpp:
  merge
2005-11-18 16:38:01 +01:00
unknown
6b3a9caef9 Make storage engines "pluggable", handlerton work
Makefile.am:
  Changes to autoconf subst
config/ac-macros/ha_berkeley.m4:
  simplify
config/ac-macros/ha_ndbcluster.m4:
  simplify
config/ac-macros/ha_partition.m4:
  simplify
configure.in:
  strip configure of storage engine specific cruft and simplify
extra/Makefile.am:
  changes to autoconf/automake subst
libmysqld/Makefile.am:
  only compile storage engines if required.
  make find object file a little smarter
libmysqld/examples/Makefile.am:
  changes to autoconf subst
mysql-test/Makefile.am:
  remove storage engine specific cruft
mysql-test/r/ps_1general.result:
  cannot gaurantee order of results from 'show storage engines'
mysql-test/r/show_check.result:
  fix test - frm file fails to be deleted if it is invalid
mysql-test/r/sql_mode.result:
  isam does not exist, test may need to be redone/fixed in 5.0
mysql-test/r/warnings.result:
  isam no longer exists
mysql-test/t/ps_1general.test:
  cannot gaurantee order of results from 'show storage engines'
mysql-test/t/show_check.test:
  fix test - frm file fails to be deleted if it is invalid
mysql-test/t/sql_mode.test:
  isam does not exist, test may need to be redone/fixed in 5.0
mysql-test/t/system_mysql_db_fix.test:
  change isam to myisam
mysql-test/t/view.test:
  change isam to myisam
mysql-test/t/warnings.test:
  isam no longer exists
sql/Makefile.am:
  Make storage engines "pluggable" stage 1
  only compile storage engines if included
sql/examples/ha_example.cc:
  handlerton work
sql/examples/ha_example.h:
  handlerton work
sql/examples/ha_tina.cc:
  handlerton work
sql/examples/ha_tina.h:
  handlerton work
sql/ha_archive.cc:
  handlerton work
sql/ha_archive.h:
  handlerton work
sql/ha_berkeley.cc:
  handlerton work
sql/ha_berkeley.h:
  handlerton work
sql/ha_blackhole.cc:
  handlerton work
sql/ha_federated.cc:
  handlerton work
sql/ha_federated.h:
  handlerton work
sql/ha_heap.cc:
  handlerton work
sql/ha_innodb.cc:
  handlerton work
sql/ha_innodb.h:
  handlerton work
sql/ha_myisam.cc:
  handlerton work
sql/ha_myisammrg.cc:
  handlerton work
sql/ha_ndbcluster.cc:
  handlerton work
sql/ha_ndbcluster.h:
  handlerton work
sql/ha_partition.cc:
  handlerton work
sql/handler.cc:
  start removing storage engine specific cruft
sql/handler.h:
  start removing storage engine specific cruft
  db_type for binlog handlerton
  handlerton flag for not-user-selectable storage engines
sql/lex.h:
  start removing storage engine specific cruft
sql/log.cc:
  handlerton work
  give binlog handlerton a 'real' db_type
sql/mysql_priv.h:
  start removing storage engine specific cruft
sql/mysqld.cc:
  start removing storage engine specific cruft
sql/set_var.cc:
  start removing storage engine specific cruft
sql/sp_head.cc:
  start removing storage engine specific cruft
sql/sql_class.cc:
  start removing storage engine specific cruft
sql/sql_class.h:
  start removing storage engine specific cruft
sql/sql_lex.h:
  start removing storage engine specific cruft
sql/sql_manager.cc:
  start removing storage engine specific cruft
sql/sql_manager.h:
  start removing storage engine specific cruft
sql/sql_parse.cc:
  start removing storage engine specific cruft
sql/sql_partition.cc:
  start removing storage engine specific cruft
sql/sql_prepare.cc:
  start removing storage engine specific cruft
sql/sql_show.cc:
  start removing storage engine specific cruft
sql/sql_table.cc:
  changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
  start removing storage engine specific cruft
sql/sql_update.cc:
  changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
sql/sql_yacc.yy:
  start removing storage engine specific cruft
  test if we should throw error
sql/table.cc:
  changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
sql/table.h:
  changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
sql/unireg.cc:
  changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
storage/ndb/include/kernel/kernel_types.h:
  added my_config.h
storage/ndb/include/ndb_global.h.in:
  added my_config.h
storage/ndb/include/ndb_types.h.in:
  added my_config.h
config/ac-macros/storage.m4:
  New BitKeeper file ``config/ac-macros/storage.m4''
sql/handlerton.cc.in:
  New BitKeeper file ``sql/handlerton.cc.in''
2005-11-07 16:25:06 +01:00
unknown
2361720c98 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1


BUILD/FINISH.sh:
  Auto merged
BitKeeper/deleted/.del-makefilewin.i~5c8479dcb8a455b2:
  Auto merged
BitKeeper/deleted/.del-makefilewin~13888739357b3025:
  Auto merged
BitKeeper/deleted/.del-makefilewin~14f24a4a173e2fcd:
  Auto merged
BitKeeper/deleted/.del-makefilewin~15e9e5c9e8fa870b:
  Auto merged
BitKeeper/deleted/.del-makefilewin~1c53f31b88dd36e:
  Auto merged
BitKeeper/deleted/.del-makefilewin~1dbc058d76ebf1db:
  Auto merged
BitKeeper/deleted/.del-makefilewin~2e0407fe123f8365:
  Auto merged
BitKeeper/deleted/.del-makefilewin~2fc379bd4065c995:
  Auto merged
BitKeeper/deleted/.del-makefilewin~389ee2dcf79afb79:
  Auto merged
BitKeeper/deleted/.del-makefilewin~4d139e182457e553:
  Auto merged
BitKeeper/deleted/.del-makefilewin~5104767c73775697:
  Auto merged
BitKeeper/deleted/.del-makefilewin~608ed49dcd88e0f7:
  Auto merged
BitKeeper/deleted/.del-makefilewin~63acd666293282a:
  Auto merged
BitKeeper/deleted/.del-makefilewin~6ba64863bce3d0b8:
  Auto merged
BitKeeper/deleted/.del-makefilewin~72a64128bacce71b:
  Auto merged
BitKeeper/deleted/.del-makefilewin~78000390c783b1c5:
  Auto merged
BitKeeper/deleted/.del-makefilewin~7a9d7d5a42bbfaf5:
  Auto merged
Makefile.am:
  Auto merged
BitKeeper/deleted/.del-makefilewin~a40ea12eebdd6ef0:
  Auto merged
BitKeeper/deleted/.del-makefilewin~aeea7c82f21f7cf5:
  Auto merged
BitKeeper/deleted/.del-makefilewin~b643e38d8da389ac:
  Auto merged
BitKeeper/deleted/.del-makefilewin~c7b621c745e5de95:
  Auto merged
BitKeeper/deleted/.del-makefilewin~c8273a47b90f52bb:
  Auto merged
BitKeeper/deleted/.del-makefilewin~d1a9d1f7d33fcb73:
  Auto merged
BitKeeper/deleted/.del-makefilewin~d37b6b303348c871:
  Auto merged
BitKeeper/deleted/.del-makefilewin~d90f35fdc3f2ee5f:
  Auto merged
BitKeeper/deleted/.del-makefilewin~dc4b8ad5ea53bd:
  Auto merged
BitKeeper/deleted/.del-makefilewin~dea10ec1c94f7be:
  Auto merged
BitKeeper/deleted/.del-makefilewin~ef3a208fa0e9b0db:
  Auto merged
BitKeeper/deleted/.del-makefilewin~f1e3b890aa1c9ea3:
  Auto merged
BitKeeper/deleted/.del-makefilewin~f4b7b99a887b7de:
  Auto merged
BitKeeper/deleted/.del-makefilewin~fdda94ad32fa9e34:
  Auto merged
BitKeeper/deleted/.del-my_cnf~977f69858affc57b:
  Auto merged
BitKeeper/etc/config:
  Auto merged
VC++Files/libmysqld/libmysqld.dsp:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Auto merged
client/mysqltest.c:
  Auto merged
include/Makefile.am:
  Auto merged
include/base64.h:
  Auto merged
include/my_base.h:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/ndb_basic.result:
  Auto merged
mysql-test/r/ndb_condition_pushdown.result:
  Auto merged
mysql-test/t/alter_table.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/base64.c:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
scripts/mysql_create_system_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  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_help.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.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_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
storage/heap/_check.c:
  Auto merged
storage/heap/hp_create.c:
  Auto merged
storage/innobase/include/Makefile.am:
  Auto merged
storage/innobase/include/rem0rec.h:
  Auto merged
storage/innobase/include/rem0rec.ic:
  Auto merged
storage/innobase/row/row0ins.c:
  Auto merged
storage/innobase/row/row0upd.c:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/mi_rkey.c:
  Auto merged
storage/myisam/mi_rnext_same.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamdef.h:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/myisammrg/myrg_queue.c:
  Auto merged
storage/ndb/config/type_util.mk.am:
  Auto merged
storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp:
  Auto merged
storage/ndb/include/mgmapi/mgmapi_config_parameters.h:
  Auto merged
storage/ndb/include/mgmapi/ndbd_exit_codes.h:
  Auto merged
storage/ndb/include/transporter/TransporterCallback.hpp:
  Auto merged
storage/ndb/src/common/mgmcommon/IPCConfig.cpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.cpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.hpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.unix.cpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.win32.cpp:
  Auto merged
storage/ndb/src/common/transporter/Transporter.hpp:
  Auto merged
storage/ndb/src/common/transporter/TransporterRegistry.cpp:
  Auto merged
storage/ndb/src/common/util/Makefile.am:
  Auto merged
storage/ndb/src/common/util/Parser.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
storage/ndb/src/kernel/error/ndbd_exit_codes.c:
  Auto merged
storage/ndb/src/kernel/vm/FastScheduler.cpp:
  Auto merged
storage/ndb/src/kernel/vm/TransporterCallback.cpp:
  Auto merged
storage/ndb/src/kernel/vm/VMSignal.hpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
storage/ndb/src/mgmsrv/Services.cpp:
  Auto merged
storage/ndb/src/ndbapi/TransporterFacade.cpp:
  Auto merged
storage/ndb/test/ndbapi/testBackup.cpp:
  Auto merged
storage/ndb/test/ndbapi/testOperations.cpp:
  Auto merged
storage/ndb/test/src/HugoCalculator.cpp:
  Auto merged
storage/ndb/tools/ndb_condig.cpp:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
BUILD/SETUP.sh:
  manual merge
configure.in:
  manual merge
mysql-test/r/alter_table.result:
  manual merge
sql/handler.cc:
  manual merge
sql/mysql_priv.h:
  manual merge
sql/records.cc:
  manual merge
sql/share/errmsg.txt:
  manual merge
sql/sql_table.cc:
  manual merge
  Fix labels
sql/sql_update.cc:
  manual merge
sql/table.cc:
  manual merge
sql/unireg.cc:
  manual merge
storage/ndb/config/type_ndbapi.mk.am:
  manual merge
2005-11-05 01:32:55 +02:00
unknown
4d155f06ee Merge mysql.com:/home/psergey/mysql-5.0-bug14026-r2
into mysql.com:/home/psergey/mysql-5.0-oct03-push


mysql-test/r/join_nested.result:
  Auto merged
mysql-test/t/join_nested.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/table.h:
  Auto merged
2005-11-03 16:21:21 +03:00
unknown
4693b58da0 Minor comments.
sql/sql_lex.h:
  Minor fix of a comment.
sql/table.h:
  Minor fix of a comment.
2005-10-29 13:11:34 +04:00
unknown
c1852b1202 fixe of typos, comments & layout
sql/item_func.cc:
  fixed typo
sql/sql_acl.cc:
  comment fixed
sql/sql_parse.cc:
  comment fixed
sql/sql_view.cc:
  layout fixed
sql/table.cc:
  typo fixed
  layout fixed
sql/table.h:
  typo fixed
2005-10-28 00:56:44 +03:00
unknown
24ac4019c5 support of view underlying tables and SP functions security check added (BUG#9505) (WL#2787)
mysql-test/r/information_schema.result:
  error message changed
mysql-test/r/sp.result:
  error message changed
mysql-test/r/sql_mode.result:
  fixed test suite
mysql-test/r/view.result:
  error message changed
mysql-test/r/view_grant.result:
  test of underlying view tables check
mysql-test/t/sql_mode.test:
  fixed test suite
mysql-test/t/view_grant.test:
  test of underlying view tables check
sql/item.cc:
  check of underlying tables privilege added
sql/item.h:
  Name the resolution context points to the security  context of view (if item belong to the view)
sql/item_func.cc:
  a view error hiding for execution of prepared function belonged to a view
  fixed checking privileges if stored functions belonds to some view
sql/mysql_priv.h:
  refult of derived table processing functions changed to bool
  Security_context added as an argument to find_field_in_table()
sql/share/errmsg.txt:
  error message fixed
sql/sql_acl.cc:
  Storing requested privileges of tables added
  View underlying tables privilege check added
sql/sql_base.cc:
  View underlying tables privilege check added
sql/sql_cache.cc:
  Code cleunup: we should not register underlying tables of view second time
sql/sql_delete.cc:
  ancestor -> merge_underlying_list renaming
sql/sql_derived.cc:
  refult of derived table processing functions changed to bool
  do not give SELECT_ACL for TEMPTABLE views
sql/sql_lex.h:
  The comment added
sql/sql_parse.cc:
  registration of requested privileges added
sql/sql_prepare.cc:
  registration of requested privileges added
sql/sql_update.cc:
  manipulation of requested privileges for underlying tables made the same as for table which we are updating
sql/sql_view.cc:
  underlying tables of view security check support added
sql/table.cc:
  renaming and fixing view preparation methods, methods for checking underlyoing tables security context added
sql/table.h:
  storege for reuested privileges added
2005-10-28 00:18:23 +03:00
unknown
2b7f5a45e9 BUG#13126: When choosing join order for join with nested joins, don't produce join
orders that cannot be handled by the executioner.


mysql-test/r/bigint.result:
  Added mssing "drop table if exists"
mysql-test/r/join_nested.result:
  Testcase for BUG#13126
mysql-test/t/bigint.test:
  Added mssing "drop table if exists"
mysql-test/t/join_nested.test:
  Testcase for BUG#13126
sql/mysql_priv.h:
  BUG#13126: Added nested_join_map type.
sql/sql_prepare.cc:
  BUG#13126: Don't set NESTED_JOIN::counter to 0 here as it is reset in other place now.
sql/sql_select.cc:
  BUG#13126: When choosing join order for join with nested joins, don't produce join orders
  that the executioner cannot handle. The work is done by check_interleaving_with_nj() and 
  restore_prev_nj_state() functions that are used from the join optimizer to avoid building
  invalid join orders.
sql/sql_select.h:
  BUG#13126: Added JOIN_TAB::embedding_map and JOIN::cur_embedding_map.
sql/table.h:
  BUG#13126: In NESTED_JOIN: added nj_map, added comment about where counter is used.
2005-10-25 19:28:27 +04:00
unknown
c2621f3dcb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


BUILD/SETUP.sh:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_sys.h:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/information_schema_inno.result:
  Auto merged
mysql-test/r/multi_statement.result:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/temp_table.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/information_schema_inno.test:
  Auto merged
mysql-test/t/multi_statement.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/temp_table.test:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/structs.h:
  Auto merged
sql/table.h:
  Auto merged
strings/decimal.c:
  Auto merged
sql/sql_parse.cc:
  manual merge
sql/sql_prepare.cc:
  manual merge
sql/table.cc:
  manual merge
2005-10-08 03:37:23 +03:00
unknown
c807724f36 Review of code pushed since last 5.0 pull:
Ensure that ccache is also used for C programs
mysql: Ensure that 'delimiter' works the same way in batch mode as in normal mode
mysqldump: Change to use ;; (instead of //) as a stored procedure/trigger delimiter
Fixed test cases by adding missing DROP's and rename views to be of type 'v#'
Removed MY_UNIX_PATH from fn_format()
Removed current_db_used from TABLE_LIST
Removed usage of 'current_thd' in Item_splocal
Removed some compiler warnings
A bit faster longlong2str code



BUILD/FINISH.sh:
  Ensure that ccache is also used for C programs
BUILD/SETUP.sh:
  Ensure that ccache is also used for C programs
client/mysql.cc:
  More debugging
  Ensure that 'delimiter' works the same way in batch mode as in normal mode.
  Compare 'delimiter' command case-insensitive.
  The above fixes the delimiter bugs so that we can now use ;; as a trigger/SP function delimiter in mysqldump.
client/mysqldump.c:
  Indentation fixes
  Use ;; as a delmimiter for stored procedures and triggers instead of //
client/mysqltest.c:
  Indentation fixes
include/my_sys.h:
  Remove not needed MY_UNIX_PATH parameter
mysql-test/r/alter_table.result:
  Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start)
mysql-test/r/func_str.result:
  More testing of CONV() (to ensure that longlong2str() works correctly)
mysql-test/r/information_schema.result:
  Drop all used tables and views
  Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails
mysql-test/r/information_schema_inno.result:
  Drop all used tables
mysql-test/r/multi_statement.result:
  Drop used tables
mysql-test/r/mysql.result:
  Add error messages to result
mysql-test/r/mysqldump.result:
  ;; is now used as SP/trigger delimiter
mysql-test/r/mysqlshow.result:
  Drop used tables
mysql-test/r/temp_table.result:
  Drop used views
  Rename views to v#
mysql-test/t/alter_table.test:
  Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start)
mysql-test/t/func_str.test:
  More testing of CONV() (to ensure that longlong2str() works correctly)
mysql-test/t/information_schema.test:
  Drop all used tables and views
  Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails
mysql-test/t/information_schema_inno.test:
  Drop all used tables
mysql-test/t/multi_statement.test:
  Drop used tables
mysql-test/t/mysql.test:
  Add error messages to result
mysql-test/t/mysqlshow.test:
  Drop used tables
mysql-test/t/temp_table.test:
  Drop used views
  Rename views to v#
mysys/mf_format.c:
  Remove not needed MY_UNIX_PATH parameter
  (This goes against how fn_format() is supposed to work and also conflicts with other options like MY_RETURN_REAL_PATH)
sql/ha_federated.cc:
  Removed extra empty line
sql/item.cc:
  Use 'str_value' instead of 'str_value_ptr' to hold result for Item_splocal
  Remove some calls to 'thd' in Item_splocal by making 'thd' a class variable
  One doesn't have to set 'null_value' when calling 'is_null()'
sql/item.h:
  Add THD as a class variable to Item_splocal
  Use 'str_value' instead of 'str_value_ptr' to hold temp result
  Fixed bug in Item_hex when used in CAST()
sql/item_func.cc:
  Optimize new code
sql/log_event.cc:
  Move 'to_unix_path()' out of fn_format()
sql/opt_range.cc:
  Simplify code
sql/sp_head.cc:
  Ensure that Item_splocal has thd set before we call '->this_item()'
sql/sql_class.cc:
  Return error if Statement::insert() fails in either hash_insert()
sql/sql_parse.cc:
  Remove 'current_db_used' as we can trivially check if db table qualifier was used without this.
  Simplify code
sql/sql_prepare.cc:
  Use enum instead of const int, to avoid ugly code for VC++
sql/structs.h:
  Remove compiler warnings when using STRING_WITH_LEN() with constant strings.
sql/table.cc:
  Fixed indentation
sql/table.h:
  Remove not needed current_db_used
strings/decimal.c:
  Simplify code
strings/longlong2str-x86.s:
  A bit faster longlong2str.
  (Took some ideas from Peter Gulutzan's code)
strings/my_strtoll10.c:
  Simplify code for MetroWerks compiler
2005-10-06 17:54:43 +03:00
unknown
d04832d195 Merge
BitKeeper/etc/ignore:
  auto-union
BUILD/autorun.sh:
  Auto merged
BitKeeper/deleted/.del-bdb.vcproj~ed8534936e40cefb:
  Auto merged
BitKeeper/deleted/.del-heap.vcproj~70c0cc1d680a51c1:
  Auto merged
BitKeeper/deleted/.del-innobase.vcproj~71e1de81f11138bf:
  Auto merged
BitKeeper/deleted/.del-myisam.vcproj~32bb9e4a163fcb5a:
  Auto merged
BitKeeper/deleted/.del-myisammrg.vcproj~6534e59acbfbb63:
  Auto merged
BitKeeper/deleted/.del-mysqld.vcproj~703886a28862bb2:
  Auto merged
Makefile.am:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_global.h:
  Auto merged
include/mysql_com.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/ndb_alter_table.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysys/default.c:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
scripts/mysql_create_system_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_acl.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_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.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
sql/unireg.cc:
  Auto merged
storage/innobase/buf/buf0buf.c:
  Auto merged
storage/innobase/buf/buf0flu.c:
  Auto merged
storage/innobase/data/data0data.c:
  Auto merged
storage/innobase/dict/dict0dict.c:
  Auto merged
storage/innobase/include/btr0btr.h:
  Auto merged
storage/innobase/include/data0type.ic:
  Auto merged
storage/innobase/include/dict0dict.h:
  Auto merged
storage/innobase/include/dict0mem.h:
  Auto merged
storage/innobase/include/mem0mem.h:
  Auto merged
storage/innobase/include/mem0mem.ic:
  Auto merged
storage/innobase/include/os0file.h:
  Auto merged
storage/innobase/include/row0mysql.h:
  Auto merged
storage/innobase/include/trx0trx.h:
  Auto merged
storage/innobase/include/ut0mem.h:
  Auto merged
storage/innobase/mem/mem0mem.c:
  Auto merged
storage/innobase/os/os0file.c:
  Auto merged
storage/innobase/os/os0proc.c:
  Auto merged
storage/innobase/rem/rem0rec.c:
  Auto merged
storage/innobase/row/row0ins.c:
  Auto merged
storage/innobase/row/row0mysql.c:
  Auto merged
storage/innobase/srv/srv0start.c:
  Auto merged
storage/innobase/trx/trx0sys.c:
  Auto merged
storage/innobase/trx/trx0trx.c:
  Auto merged
storage/innobase/ut/ut0mem.c:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_dbug.c:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/mi_delete_all.c:
  Auto merged
storage/myisam/mi_key.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisam/mi_rkey.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_test1.c:
  Auto merged
storage/myisam/mi_update.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamdef.h:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisam/sp_key.c:
  Auto merged
storage/myisammrg/myrg_rkey.c:
  Auto merged
storage/ndb/include/kernel/GlobalSignalNumbers.h:
  Auto merged
storage/ndb/include/kernel/signaldata/ApiVersion.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/EventReport.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/StopReq.hpp:
  Auto merged
storage/ndb/include/mgmapi/ndb_logevent.h:
  Auto merged
storage/ndb/include/ndbapi/NdbBlob.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbIndexOperation.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbOperation.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbRecAttr.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbTransaction.hpp:
  Auto merged
storage/ndb/src/common/util/SimpleProperties.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
storage/ndb/src/mgmapi/ndb_logevent.cpp:
  Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
  Auto merged
storage/ndb/src/mgmsrv/Config.cpp:
  Auto merged
storage/ndb/src/mgmsrv/Config.hpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
  Auto merged
storage/ndb/src/mgmsrv/InitConfigFileParser.hpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp:
  Auto merged
storage/ndb/src/mgmsrv/Services.cpp:
  Auto merged
storage/ndb/src/mgmsrv/Services.hpp:
  Auto merged
storage/ndb/src/mgmsrv/main.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbApiSignal.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbApiSignal.hpp:
  Auto merged
storage/ndb/src/ndbapi/NdbBlob.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbImpl.hpp:
  Auto merged
storage/ndb/src/ndbapi/NdbRecAttr.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbUtil.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbUtil.hpp:
  Auto merged
storage/ndb/src/ndbapi/Ndbif.cpp:
  Auto merged
storage/ndb/src/ndbapi/Ndblist.cpp:
  Auto merged
storage/ndb/src/ndbapi/ObjectMap.hpp:
  Auto merged
storage/ndb/test/include/NDBT_Test.hpp:
  Auto merged
storage/ndb/test/ndbapi/bank/BankLoad.cpp:
  Auto merged
storage/ndb/test/ndbapi/testOIBasic.cpp:
  Auto merged
storage/ndb/test/src/HugoCalculator.cpp:
  Auto merged
storage/ndb/test/src/NDBT_Test.cpp:
  Auto merged
storage/ndb/test/src/NdbBackup.cpp:
  Auto merged
storage/ndb/test/src/NdbRestarts.cpp:
  Auto merged
storage/ndb/tools/ndb_condig.cpp:
  Auto merged
storage/ndb/tools/restore/Restore.cpp:
  Auto merged
storage/ndb/tools/restore/consumer_restore.cpp:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
configure.in:
  merge
BUILD/SETUP.sh:
  merge
BitKeeper/deleted/.del-mysql.sln~f2120278f8a437be:
  SCCS merged
libmysqld/Makefile.am:
  merge
sql/ha_ndbcluster.cc:
  merge
sql/handler.h:
  merge
sql/mysqld.cc:
  merge
sql/opt_range.cc:
  merge
sql/slave.cc:
  merge
sql/slave.h:
  e
  merge
sql/sql_parse.cc:
  merge
sql/table.cc:
  merge
sql/examples/ha_tina.cc:
  merge
sql/examples/ha_tina.h:
  merge
sql/share/errmsg.txt:
  merge
storage/ndb/include/ndbapi/Ndb.hpp:
  merge
storage/ndb/src/common/debugger/EventLogger.cpp:
  merge
storage/ndb/src/kernel/blocks/dbdict/Makefile.am:
  merge
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  merge
storage/ndb/src/ndbapi/Ndbinit.cpp:
  SCCS merged
2005-10-06 10:54:07 +02:00
unknown
ba95081510 sql_table.cc, table.cc, table.h:
fixed CHECKSUM TABLE to be independent from last - undefined in InnoDB - bits in the null bitmask
  bug#13710


sql/table.h:
  fixed CHECKSUM TABLE to be independent from last - undefined in InnoDB - bits in the null bitmask
  bug#13710
sql/table.cc:
  fixed CHECKSUM TABLE to be independent from last - undefined in InnoDB - bits in the null bitmask
  bug#13710
sql/sql_table.cc:
  fixed CHECKSUM TABLE to be independent from last - undefined in InnoDB - bits in the null bitmask
  bug#13710
2005-10-04 17:04:20 +02:00
unknown
813fc4104e A fix and a test case for Bug#6513 "Test Suite: Values inserted by using
cursor is interpreted latin1 character and Bug#9819 "Cursors: Mysql Server
Crash while fetching from table with 5 million records."
A fix for a possible memory leak when fetching into an SP cursor
in a long loop.
The patch uses a common implementation of cursors in the binary protocol and 
in stored procedures and implements materialized cursors.
For implementation details, see comments in sql_cursor.cc


include/my_sys.h:
  - declaration for multi_alloc_root
libmysqld/Makefile.am:
  - drop protocol_cursor.cc, add sql_cursor.cc (replaces the old
  implementation of cursors with a new one)
mysql-test/r/ctype_ujis.result:
  - test results fixed (a test case for Bug#6513)
mysql-test/r/sp-big.result:
  - test results fixed (a test case for Bug#9819)
mysql-test/t/ctype_ujis.test:
  Add a test case for Bug#6513 "Test Suite: Values inserted by using cursor is
   interpreted latin1 character"
mysql-test/t/sp-big.test:
  Add a restricted test case for Bug#9819 "Cursors: Mysql Server Crash
  while fetching from table with 5 million records."
mysys/my_alloc.c:
  - an implementation of multi_alloc_root; this is largely a copy-paste
    from mulalloc.c, but the function is small and there is no easy way
    to reuse the existing C function.
sql/Makefile.am:
  - add sql_cursor.h, sql_cursor.cc (a new implementation of stored procedure
  cursors) and drop protocol_cursor.cc (the old one)
sql/handler.cc:
  - now TABLE object has its mem_root always initialized.
    Adjust the implementation handler::ha_open
sql/item_subselect.cc:
  - adjust to the changed declaration of st_select_lex_unit::prepare
sql/protocol.h:
  - drop Protocol_cursor
sql/sp_head.cc:
  - move juggling with Query_arena::free_list and Item::next to
    sp_eval_func_item, as this is needed in 3 places already.
sql/sp_head.h:
  - declare a no-op implementation for cleanup_stmt in sp_instr_cpush.
    This method is needed for non-materializing cursors, which are yet not 
    used in stored procedures.
  - declaration for sp_eval_func_item
sql/sp_rcontext.cc:
  - reimplement sp_cursor using the new implementation of server side cursors.
  - use sp_eval_func_item to assign values of SP variables from the
    row fetched from a cursor. This should fix a possible memory leak in 
    the old implementation of sp_cursor::fetch
sql/sp_rcontext.h:
  - reimplement sp_cursor using the new implementation of server side cursors.
sql/sql_class.cc:
  - disable the functionality that closes transient cursors at commit/rollback;
    transient cursors are not used in 5.0, instead we use materialized ones.
    To be enabled in a later version.
sql/sql_class.h:
  - adjust to the rename Cursor -> Server_side_cursor
  - additional declarations of select_union used in materialized cursors
sql/sql_derived.cc:
  - reuse bits of tmp table code in UNION, derived tables, and materialized
    cursors
  - cleanup comments
sql/sql_lex.h:
  - declarations of auxiliary methods used by materialized cursors
  - a cleanup in st_select_lex_unit interface
sql/sql_list.h:
  - add an array operator new[] to class Sql_alloc
sql/sql_prepare.cc:
  - split the tight coupling of cursors and prepared statements to reuse 
    the same implementation in stored procedures
  - cleanups of error processing in Prepared_statement::{prepare,execute}
sql/sql_select.cc:
  - move the implementation of sensitive (non-materializing) cursors to 
    sql_cursor.cc
  - make temporary tables self-contained: the table, its record and fields
    are allocated in TABLE::mem_root. This implementation is not clean
    and resets thd->mem_root several times because of the way create_tmp_table 
    works (many additional things are done inside it).
  - adjust to the changed declaration of st_select_lex_unit::prepare
sql/sql_select.h:
  - move the declaration of sensitive (non-materializing) cursors to 
    sql_cursor.cc
sql/sql_union.cc:
  - move pieces of st_select_unit::prepare to select_union and st_table
    methods to be able to reuse code in the implementation of materialized
    cursors
sql/sql_view.cc:
  - adjust to the changed signature of st_select_lex_unit::prepare
sql/table.cc:
  - implement auxiliary st_table methods for use with temporary tables
sql/table.h:
  - add declarations for auxiliary methods of st_table used to work with 
   temporary tables
tests/mysql_client_test.c:
  - if cursors are materialized, a parallel update of the table used
    in the cursor may go through: update the test.
sql/sql_cursor.cc:
  New BitKeeper file ``sql/sql_cursor.cc'' -- implementation of server side
  cursors
sql/sql_cursor.h:
  New BitKeeper file ``sql/sql_cursor.h'' - declarations for
  server side cursors.
2005-09-22 02:11:21 +04:00
unknown
ee2125c919 merge
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_acl.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/ndb/src/common/portlib/NdbTCP.cpp:
  Auto merged
storage/ndb/src/common/portlib/win32/NdbTCP.c:
  Auto merged
2005-09-14 17:58:20 +02:00
unknown
d0a78e6fa6 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-owner2-5.0


sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/func_in.result:
  merge
mysql-test/r/lowercase_view.result:
  merge
mysql-test/r/mysqldump.result:
  merge
mysql-test/r/sql_mode.result:
  merge
mysql-test/r/temp_table.result:
  merge
mysql-test/r/view.result:
  merge
mysql-test/t/view.test:
  merge
2005-09-14 11:07:04 +03:00
unknown
f7aeb6f9fd part 1 (ver 2, postreview fix) of WL#2787
view definer information syntax/storage/replication
fixed SOURCE field of .frm


mysql-test/r/func_in.result:
  definer information added to CREATE VIEW
mysql-test/r/lowercase_view.result:
  definer information added to CREATE VIEW
mysql-test/r/mysqldump.result:
  definer information added to CREATE VIEW
mysql-test/r/rpl_view.result:
  check log of queries
mysql-test/r/skip_grants.result:
  --skip-grants do not allow use user information
mysql-test/r/sql_mode.result:
  definer information added to CREATE VIEW
mysql-test/r/temp_table.result:
  definer information added to CREATE VIEW
mysql-test/r/view.result:
  definer information added to CREATE VIEW
  test of storing/restoring definer information
mysql-test/r/view_grant.result:
  test of grant check of definer information
  definer information added to CREATE VIEW
mysql-test/t/rpl_view.test:
  check log of queries
mysql-test/t/skip_grants.test:
  --skip-grants do not allow use user information
mysql-test/t/view.test:
  test of storing/restoring definer information
mysql-test/t/view_grant.test:
  test of grant check of definer information
sql/mysql_priv.h:
  CREATE/ALTER VIEW print support
  set current user as definer procedure
sql/share/errmsg.txt:
  new errors/warnings
sql/sql_acl.cc:
  make find_acl_user public to allow to check user
sql/sql_acl.h:
  make find_acl_user public to allow to check user
sql/sql_lex.h:
  storing definer information
sql/sql_parse.cc:
  send CREATE/ALTER VIEW for replication with full list of options
  set current user as definer procedure
sql/sql_show.cc:
  new CREATE VIEW options printed
sql/sql_view.cc:
  check of definer clause
  changes in .frm file
  definer information storage support
  now we store only original SELECT in SOURCE field of .frm
sql/sql_yacc.yy:
  definer information sintax support
  getting SOURCE field information for .frm
sql/table.h:
  definer information storage
2005-09-14 10:53:09 +03:00
unknown
8943090c33 Merge neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new
into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my51-bug10713_new


mysql-test/mysql-test-run.sh:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_help.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_udf.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/ndb/src/ndbapi/SignalSender.cpp:
  Auto merged
VC++Files/mysql.sln:
  Manual merge 5.0 -> 5.1
scripts/make_win_src_distribution.sh:
  Manual merge 5.0 -> 5.1
sql/field.cc:
  Manual merge 5.0 -> 5.1
2005-09-14 09:43:56 +02:00
unknown
ee4b49698d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new


mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/table.h:
  Auto merged
2005-09-14 08:10:18 +02:00
unknown
fc8a066a8b Merge neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new
into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my51-bug10713_new


sql/item.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/table.h:
  Auto merged
2005-09-13 12:44:58 +02:00
unknown
9a96be05e0 Merge neptunus.(none):/home/msvensson/mysql/bug10713
into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new


sql/sql_select.cc:
  Auto merged
mysql-test/r/mysqldump.result:
  Manual merge
mysql-test/t/mysqldump.test:
  Manual merge
sql/item.cc:
  Manual merge
sql/sql_show.cc:
  Manual merge
sql/table.h:
  Manual merge
2005-09-13 09:41:01 +02:00
unknown
00d77fdd75 Made changes to add federated CONNECTION information to the .frm file
(per Monty's patch).
Remove references to the "COMMENT" field.
WL#2414


mysql-test/r/federated.result:
  alter from "COMMENT=" to "CONNECTION="
mysql-test/r/federated_archive.result:
  change "COMMENT=" to "CONNECTION="
mysql-test/t/federated.test:
  change from "COMMENT=" to "CONNECTION="
mysql-test/t/federated_archive.test:
  change from "COMMENT=" to "CONNECTION="
sql/ha_federated.cc:
  Change parsing of char* table->s->comment to LEX_STRING table->s->connect_string
  (per Monty's patch)
sql/handler.h:
  added LEX_STRING "connection_string"
  (per Monty's patch)
sql/sql_yacc.yy:
  added setting of "connect_string" string and length
sql/table.cc:
  Modifying frm file to store connecting information (code change came from Monty).
sql/table.h:
  added connect_string
sql/unireg.cc:
  Storing information on connection_string (code came from Monty).
2005-09-12 18:02:17 -07:00
unknown
f6c1d4191c Merge
Makefile.am:
  Auto merged
BitKeeper/etc/config:
  Auto merged
scripts/Makefile.am:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.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_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/innobase/include/page0page.ic:
  Auto merged
storage/innobase/include/univ.i:
  Auto merged
storage/innobase/row/row0mysql.c:
  Auto merged
storage/innobase/row/row0sel.c:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_packrec.c:
  Auto merged
storage/myisam/mi_static.c:
  Auto merged
storage/myisam/myisamdef.h:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/ndb/include/kernel/signaldata/SignalData.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/StartFragReq.hpp:
  Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp:
  Auto merged
storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp:
  Auto merged
storage/ndb/src/common/debugger/signaldata/StartRec.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp:
  Auto merged
storage/ndb/src/kernel/main.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/kernel/vm/Emulator.cpp:
  Auto merged
sql/log_event.cc:
  SCCS merged
sql/sql_prepare.cc:
  SCCS merged
sql/share/errmsg.txt:
  merge
2005-09-06 09:20:15 +02:00
unknown
74ea939fa2 Bug10213 mysqldump crashes when dumping VIEWs
- Added testcase for this bug
 - Check if compact view format can be used
 - Clean up mysqld_show_create


mysql-test/r/mysqldump.result:
  Updated test result
mysql-test/t/mysqldump.test:
  Added testcase
sql/item.cc:
  Check if compact format can be used
sql/sql_select.cc:
  Check if compact format can be used
sql/sql_show.cc:
  Cleanup of mysqld_show_create
   -remove extra invocation of view_store_create_info
   -Remove unused vars
   -Remove unused codes
  Check if compact show view format can be used 
    - if user has db of this view as current db
    - if this view only references table inside it's own db
sql/table.h:
  Add variable for compact_view_format indicator
2005-09-01 11:36:42 +02:00
unknown
9ea1d5e293 Merge zim.(none):/home/brian/mysql/mysql-5.0
into  zim.(none):/home/brian/mysql/mysql-5.1

Resolved to minor issues. 


BitKeeper/etc/config:
  Auto merged
Makefile.am:
  Auto merged
VC++Files/sql/mysqld.vcproj:
  Auto merged
extra/perror.c:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/t/alter_table.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysys/Makefile.am:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.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/sp.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_parse.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/examples/ha_tina.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/unireg.h:
  Auto merged
storage/innobase/lock/lock0lock.c:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamlog.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
configure.in:
  Fixed the resolve of versions.
mysql-test/r/alter_table.result:
  Fixed results.
2005-08-30 14:40:02 -07:00
unknown
ad594de473 merged
mysys/my_alloc.c:
  Auto merged
sql/sql_table.cc:
  Auto merged
2005-08-26 13:24:59 +04:00
unknown
5c0dc1ace8 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1


BitKeeper/deleted/.del-Grep.cpp~ad798e9ae519d667:
  Auto merged
BitKeeper/deleted/.del-Grep.hpp~b05e3af6cfabe387:
  Auto merged
BitKeeper/deleted/.del-GrepInit.cpp~df28ab3a892455fd:
  Auto merged
BitKeeper/deleted/.del-Makefile.am~f73be89578d3b6cc:
  Auto merged
BitKeeper/deleted/.del-Makefile~b293ae88e4394490:
  Auto merged
BitKeeper/deleted/.del-Makefile~e0b7d67078f0fae0:
  Auto merged
BitKeeper/deleted/.del-grep_systab_test.cpp~c7305578bec8cb62:
  Auto merged
BitKeeper/etc/config:
  Auto merged
config/ac-macros/ha_ndbcluster.m4:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
BitKeeper/deleted/.del-testGrep.cpp~2106eb0a6bf2a1b5:
  Auto merged
mysql-test/r/alter_table.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysys/Makefile.am:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
sql/ha_heap.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/lex.h:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.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.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/heap/hp_delete.c:
  Auto merged
storage/innobase/btr/btr0pcur.c:
  Auto merged
storage/innobase/btr/btr0sea.c:
  Auto merged
storage/innobase/include/read0read.h:
  Auto merged
storage/innobase/include/srv0srv.h:
  Auto merged
storage/innobase/include/trx0trx.h:
  Auto merged
storage/innobase/include/univ.i:
  Auto merged
storage/innobase/lock/lock0lock.c:
  Auto merged
storage/innobase/read/read0read.c:
  Auto merged
storage/innobase/row/row0ins.c:
  Auto merged
storage/innobase/row/row0sel.c:
  Auto merged
storage/innobase/row/row0umod.c:
  Auto merged
storage/innobase/row/row0upd.c:
  Auto merged
storage/innobase/srv/srv0srv.c:
  Auto merged
storage/innobase/srv/srv0start.c:
  Auto merged
storage/innobase/trx/trx0trx.c:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisammrg/myrg_static.c:
  Auto merged
storage/ndb/include/kernel/AttributeDescriptor.hpp:
  Auto merged
storage/ndb/include/kernel/BlockNumbers.h:
  Auto merged
storage/ndb/include/kernel/GlobalSignalNumbers.h:
  Auto merged
storage/ndb/include/kernel/kernel_types.h:
  Auto merged
storage/ndb/include/kernel/signaldata/AlterTable.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbDictionary.hpp:
  Auto merged
storage/ndb/include/portlib/NdbTCP.h:
  Auto merged
storage/ndb/src/common/debugger/BlockNames.cpp:
  Auto merged
storage/ndb/src/common/logger/LogHandler.cpp:
  Auto merged
storage/ndb/src/common/portlib/NdbTCP.cpp:
  Auto merged
storage/ndb/src/common/portlib/win32/NdbTCP.c:
  Auto merged
storage/ndb/src/common/transporter/TransporterRegistry.cpp:
  Auto merged
storage/ndb/src/kernel/Makefile.am:
  Auto merged
storage/ndb/src/kernel/SimBlockList.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/Makefile.am:
  Auto merged
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/suma/Suma.cpp:
  Auto merged
storage/ndb/src/kernel/vm/SimulatedBlock.cpp:
  Auto merged
storage/ndb/src/kernel/vm/SimulatedBlock.hpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
storage/ndb/src/ndbapi/DictCache.cpp:
  Auto merged
storage/ndb/src/ndbapi/DictCache.hpp:
  Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
storage/ndb/src/ndbapi/TransporterFacade.cpp:
  Auto merged
storage/ndb/tools/Makefile.am:
  Auto merged
storage/ndb/tools/ndb_condig.cpp:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Manual 5.0 - 5.1 merge
configure.in:
  Manual 5.0 - 5.1 merge
sql/mysql_priv.h:
  Manual 5.0 - 5.1 merge
sql/share/errmsg.txt:
  Manual 5.0 - 5.1 merge
sql/sql_base.cc:
  Manual 5.0 - 5.1 merge
sql/sql_prepare.cc:
  Manual 5.0 - 5.1 merge
storage/ndb/src/common/util/version.c:
  Manual 5.0 - 5.1 merge
storage/ndb/src/kernel/blocks/dblqh/Makefile.am:
  Manual 5.0 - 5.1 merge
2005-08-25 13:11:38 -04:00
unknown
173e5df37f Merge mishka.local:/home/my/mysql-4.1
into  mishka.local:/home/my/mysql-5.0


BitKeeper/etc/ignore:
  auto-union
BitKeeper/deleted/.del-Grep.cpp~ad798e9ae519d667:
  Auto merged
BitKeeper/deleted/.del-Grep.hpp~b05e3af6cfabe387:
  Auto merged
BitKeeper/deleted/.del-ctype_cp932.result:
  Auto merged
BitKeeper/deleted/.del-ctype_cp932.test:
  Auto merged
BitKeeper/deleted/.del-have_lowercase0.inc:
  Delete: mysql-test/include/have_lowercase0.inc
VC++Files/mysql-test/mysql_test_run_new.dsp:
  Auto merged
configure.in:
  Auto merged
mysql-test/include/ps_conv.inc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/examples/ha_archive.cc:
  Auto merged
sql/examples/ha_example.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
VC++Files/client/mysqltest.dsp:
  manual merge
VC++Files/sql/mysqld.dsp:
  manual merge
mysql-test/r/grant2.result:
  patch merge
mysql-test/r/subselect2.result:
  manual merge
mysql-test/t/grant2.test:
  patch merge
mysys/charset.c:
  Remove already deleted function
sql/examples/ha_archive.h:
  Manual merge
sql/sql_acl.cc:
  manual merge
sql/sql_db.cc:
  merge (no differences)
sql/sql_select.cc:
  manual merge
sql/table.h:
  merge (no differences)
tests/mysql_client_test.c:
  patch merge
2005-08-25 06:55:48 +03:00
unknown
eb7c4ff2db Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0


BitKeeper/etc/config:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/view.result:
  merge
mysql-test/t/view.test:
  merge
sql/share/errmsg.txt:
  merge
sql/sql_insert.cc:
  merge
sql/table.h:
  merge
2005-08-23 23:17:36 +03:00
unknown
2ef2e0630d Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486


mysql-test/r/select.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
2005-08-23 18:15:51 +03:00
unknown
fe24add743 WL#2486 - natural and using join according to SQL:2003
* Provide backwards compatibility extension to name resolution of
  coalesced columns. The patch allows such columns to be qualified
  with a table (and db) name, as it is in 4.1.
  Based on a patch from Monty.

* Adjusted tests accordingly to test both backwards compatible name
  resolution of qualified columns, and ANSI-style resolution of
  non-qualified columns.
  For this, each affected test has two versions - one with qualified
  columns, and one without. 


mysql-test/include/ps_query.inc:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/bdb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/innodb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/join.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/join_nested.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/join_outer.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/null_key.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/order_by.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_2myisam.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_3innodb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_4heap.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_5merge.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_6bdb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_7ndb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/select.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/subselect.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/type_ranges.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/bdb.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/innodb.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/join.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/join_nested.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/join_outer.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/null_key.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/order_by.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/select.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/subselect.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/type_ranges.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
sql/sql_base.cc:
  * Applied Monty's patch for backwards compatible name resolution
    of qualified columns. The idea is:
    - When a column is qualified, search for the column in all
      tables/views underlying each natural join. In this case
      natural joins are *not* considered leaves.
    - If a column is not qualified, then consider natural joins
      as leaves, thus directly search the result columns of
      natural joins.
  * Simplified 'find_field_in_tables()' - unified two similar
    loops into one.
sql/table.cc:
  - Removed method & members not needed after Monty's patch.
sql/table.h:
  - Removed method & members not needed after Monty's patch.
tests/mysql_client_test.c:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
2005-08-23 18:08:04 +03:00
unknown
e2c29343f8 after pull cleanup
configure.in:
  don't be too restrictive
mysql-test/r/rpl_drop_db.result:
  test case cleanup
mysql-test/t/rpl_drop_db.test:
  test case cleanup
2005-08-22 13:20:02 +04:00
unknown
0f556e8ff3 Merge mysql.com:/home/jimw/my/mysql-5.0-11711
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/sql_show.cc:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/information_schema.result:
  Resolve conflicts
2005-08-19 11:40:39 -07:00
unknown
1cb72d7eb9 WL#2486 - natural and using join according to SQL:2003
- Corrected problem with N-way nested natural joins in PS mode.
- Code cleanup
- More asserts to check consistency of name resolution contexts
- Fixed potential memory leak of name resolution contexts


mysql-test/r/join.result:
  - Corrected problem with N-way nested natural joins in PS mode.
mysql-test/t/join.test:
  - Corrected problem with N-way nested natural joins in PS mode.
sql/item.h:
  - Fixed potential memory leak.
sql/sql_base.cc:
  - the local context of Item_fields that participate in TABLE_LIST::on_cond for
    natural joins is correctly set to the tables where the corresponding fields
    originate from.
  - removed unused variables
  - correct allocation of contexts
sql/sql_parse.cc:
  - correct allocation of contexts for JOIN ON conditions.
sql/table.cc:
  - added asserts to check the consistency of name resolution contexts
sql/table.h:
  - added asserts to check the consistency of name resolution contexts
2005-08-19 15:22:30 +03:00
unknown
4652c6b053 updated patch for BUG#4680 (incomplete DROP DATABASE breaking replication).
We binlog the DROP TABLE for each table that was actually dropped. Per Sergei's 
suggestion a fixed buffer for the DROP TABLE query is pre-allocated from THD pool, and 
logging now is done in batches - new batch is started if the buffer becomes full.
Reduced memory usage by reusing the table list instead of accumulating a list of 
dropped table names. Also fixed the problem if the table was not actually dropped, eg
due to permissions. Extended the test case to make sure batched query 
logging does work.  


mysql-test/r/rpl_drop_db.result:
  test for query buffer overrun
mysql-test/t/rpl_drop_db.test:
  test for query buffer overrun
sql/mysql_priv.h:
  updated patch for BUG#4680 (incomplete DROP DATABASE breaking replication)
BitKeeper/etc/ignore:
  Added support-files/MacOSX/postflight support-files/MacOSX/preflight to the ignore list
sql/sql_db.cc:
  updated patch for BUG#4680 (incomplete DROP DATABASE breaking replication)
sql/sql_table.cc:
  updated patch for BUG#4680 (incomplete DROP DATABASE breaking replication)
sql/table.h:
  updated patch for BUG#4680 (incomplete DROP DATABASE breaking replication)
2005-08-18 21:40:14 -06:00
unknown
d33b968f03 WL#2486 - natural and using join according to SQL:2003
- fixed a problem with RIGHT JOIN ON and enabled corresponding tests in select.test
- fixed a memory leak


mysql-test/r/select.result:
  Fixed a problem with RIGHT JOIN ON queries, enabling the corresponding tests.
mysql-test/t/select.test:
  Fixed a problem with RIGHT JOIN ON queries, enabling the corresponding tests.
sql/sql_base.cc:
  Fixed a problem with RIGHT JOINs that have operand(s) which are NATURAL JOIN(s).
sql/table.h:
  Inherit from Sql_alloc for proper memory allocation.
  The change fixes a memory leak.
2005-08-17 17:19:31 +03:00
unknown
2b53b711d8 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486-merge


mysql-test/r/errors.result:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
mysql-test/r/fulltext_order_by.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/join_nested.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/errors.test:
  Auto merged
mysql-test/t/fulltext.test:
  Auto merged
mysql-test/t/fulltext_order_by.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/join_nested.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
sql/sql_insert.cc:
  merge WL#2486
sql/sql_show.cc:
  merge WL#2486
2005-08-12 19:27:54 +03:00
unknown
7517d7e112 Implementation of WL#2486 -
"Process NATURAL and USING joins according to SQL:2003".

* Some of the main problems fixed by the patch:
  - in "select *" queries the * expanded correctly according to
    ANSI for arbitrary natural/using joins
  - natural/using joins are correctly transformed into JOIN ... ON
    for any number/nesting of the joins.
  - column references are correctly resolved against natural joins
    of any nesting and combined with arbitrary other joins.

* This patch also contains a fix for name resolution of items
  inside the ON condition of JOIN ... ON - in this case items must
  be resolved only against the JOIN operands. To support such
  'local' name resolution, the patch introduces a stack of
  name resolution contexts used at parse time.

NOTICE:
- This patch is not complete in the sense that
  - there are 2 test cases that still do not pass -
    one in join.test, one in select.test. Both are marked
    with a comment "TODO: WL#2486".
  - it does not include a new test specific for the task


mysql-test/include/ps_query.inc:
  Adjusted according to standard NATURAL/USING join semantics.,
mysql-test/r/bdb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/derived.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/errors.result:
  The column as a whole cannot be resolved, so different error message.
mysql-test/r/fulltext.result:
  Adjusted according to standard JOIN ... ON semantics =>
  the ON condition can refer only to the join operands.
mysql-test/r/fulltext_order_by.result:
  More detailed error message.
mysql-test/r/innodb.result:
  Adjusted according to standard NATURAL/USING join semantics.
  This test doesn't pass completetly yet!
mysql-test/r/insert_select.result:
  More detailed error message.
mysql-test/r/join.result:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/r/join_crash.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_nested.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_outer.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/multi_update.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/null_key.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/order_by.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_2myisam.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_3innodb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_4heap.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_5merge.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_6bdb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_7ndb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/select.result:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one failing test case which is commented with
  WL#2486 in the test file.
mysql-test/r/subselect.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/type_ranges.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/union.result:
  More detailed error message.
mysql-test/t/bdb.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/errors.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/fulltext.test:
  Adjusted according to standard JOIN ... ON semantics =>
  the ON condition can refer only to the join operands.
mysql-test/t/fulltext_order_by.test:
  More detailed error message.
mysql-test/t/innodb.test:
  Adjusted according to standard NATURAL/USING join semantics.
  This test doesn't pass completetly yet!
mysql-test/t/insert_select.test:
  More detailed error message.
mysql-test/t/join.test:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/t/join_crash.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_nested.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_outer.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/null_key.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/order_by.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/select.test:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/t/subselect.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/type_ranges.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/union.test:
  More detailed error message.
sql/item.cc:
  - extra parameter to find_field_in_tables
  - find_field_in_real_table renamed to find_field_in_table
  - fixed comments/typos
sql/item.h:
  - added [first | last]_name_resolution_table to class
    Name_resolution_context
  - commented old code
  - standardized formatting
sql/mysql_priv.h:
  - refactored the find_field_in_XXX procedures,
  - added a new procedure for natural join table references,
  - renamed the find_field_in_XXX procedures to clearer names
sql/sp.cc:
  - pass the top-most list of the FROM clause to setup_tables
  - extra parameter to find_field_in_tables
sql/sql_acl.cc:
  - renamed find_field_in_table => find_field_in_table_ref
  - extra parameter to find_field_in_table_ref
  - commented old code
sql/sql_base.cc:
  This file contains the core of the implementation of the processing
  of NATURAL/USING joins (WL#2486).
  - added many comments to old code
  - refactored the group of find_field_in_XXX procedures, and added a
    new procedure for natural joins. There is one find_field_in_XXX procedure
    per each type of table reference (stored table, merge view, or natural
    join); one meta-procedure that selects the correct one depeneding on the
    table reference; and one procedure that goes over a list of table
    referenes.
  - NATURAL/USING joins are processed through the procedures:
      mark_common_columns, store_natural_using_join_columns,
      store_top_level_join_columns, setup_natural_join_row_types.
    The entry point to processing NATURAL/USING joins is the
    procedure 'setup_natural_join_row_types'.
  - Replaced the specialized Field_iterator_XXX iterators with one
    generic iterator over the fields of a table reference.
  - Simplified 'insert_fields' and 'setup_conds' due to encapsulation of
    the processing of natural joins in a separate set of procedures.
sql/sql_class.h:
  - Commented old code.
sql/sql_delete.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_help.cc:
  - pass the end name resolution table to find_field_in_tables
  - adjust the list of tables for name resolution
sql/sql_insert.cc:
  - Changed the code that saves and restores the current context to
    support the list of tables for name resolution -
    context->first_name_resolution_table, and
    table_list->next_name_resolution_table.
    Needed to support an ugly trick to resolve inserted columns only in
    the first table.
  - Added Name_resolution_context::[first | last]_name_resolution_table.
  - Commented old code
sql/sql_lex.cc:
  - set select_lex.parent_lex correctly
  - set correct state of the current name resolution context
sql/sql_lex.h:
  - Added a stack of name resolution contexts to support local
    contexts for JOIN ... ON conditions.
  - Commented old code.
sql/sql_load.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_olap.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_parse.cc:
  - correctly set SELECT_LEX::parent_lex
  - set the first table of the current name resoltion context
  - added support for NATURAL/USING joins
  - commented old code
sql/sql_select.cc:
  - Pass the FROM clause to setup_tables.
  - Pass the end table to find_field_in_tables
  - Improved comments
sql/sql_show.cc:
  - Set SELECT_LEX::parent_lex.
sql/sql_update.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_yacc.yy:
  - Added support for a stack of name resolution contexts needed to
    implement name resolution for JOIN ... ON. A context is pushed
    for each new JOIN ... ON, and popped afterwards.
  - Added support for NATURAL/USING joins.
sql/table.cc:
  - Added new class Natural_join_column to hide the heterogeneous
    representation of column references for stored tables and for
    views.
  - Added a new list TABLE_LIST::next_name_resolution_table to
    support name resolution with NATURAL/USING joins. Also added
    other members to TABLE_LIST to support NATURAL/USING joins.
  - Added a generic iterator over the fields of table references
    of various types - class Field_iterator_table_ref
sql/table.h:
  - Added new class Natural_join_column to hide the heterogeneous
    representation of column references for stored tables and for
    views.
  - Added a new list TABLE_LIST::next_name_resolution_table to
    support name resolution with NATURAL/USING joins. Also added
    other members to TABLE_LIST to support NATURAL/USING joins.
  - Added a generic iterator over the fields of table references
    of various types - class Field_iterator_table_ref
tests/mysql_client_test.c:
  Adjusted according to standard NATURAL JOIN syntax.
2005-08-12 17:57:19 +03:00
unknown
42002d5dee Report 'SYSTEM VIEW' as table_type of INFORMATION_SCHEMA views. (Bug #11711)
mysql-test/r/information_schema.result:
  Update results
sql/sql_show.cc:
  Show 'SYSTEM VIEW' for table_type of views in INFORMATION_SCHEMA.
sql/table.h:
  Add SYSTEM_TMP_TABLE to tmp_table_type enum, for internal temporary
  "tables" like INFORMATION_SCHEMA views.
2005-08-08 12:59:04 -07:00
unknown
aca6f88ebb Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1


BitKeeper/etc/config:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysys/default.c:
  Auto merged
scripts/Makefile.am:
  Auto merged
scripts/mysql_create_system_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/lock.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/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  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_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/tztime.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/innobase/buf/buf0buf.c:
  Auto merged
storage/innobase/include/os0file.h:
  Auto merged
storage/innobase/include/read0read.h:
  Auto merged
storage/innobase/include/read0types.h:
  Auto merged
storage/innobase/include/trx0trx.h:
  Auto merged
storage/innobase/os/os0file.c:
  Auto merged
storage/innobase/read/read0read.c:
  Auto merged
storage/innobase/row/row0sel.c:
  Auto merged
storage/innobase/srv/srv0srv.c:
  Auto merged
storage/innobase/srv/srv0start.c:
  Auto merged
storage/innobase/trx/trx0sys.c:
  Auto merged
storage/innobase/trx/trx0trx.c:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/ndb/include/mgmapi/mgmapi.h:
  Auto merged
storage/ndb/include/mgmapi/mgmapi_config_parameters.h:
  Auto merged
storage/ndb/src/common/portlib/NdbMutex.c:
  Auto merged
storage/ndb/src/common/portlib/NdbThread.c:
  Auto merged
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.hpp:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
configure.in:
  Manual merge 5.0 -> 5.1
mysql-test/t/alter_table.test:
  Manual merge 5.0 -> 5.1
sql/share/errmsg.txt:
  Manual merge 5.0 -> 5.1
storage/ndb/tools/Makefile.am:
  Manual merge 5.0 -> 5.1
2005-08-05 18:01:34 -04:00
unknown
7c3f55ec9c fix for bug #12315 - SHOW TABLE STATUS FROM information_schema; does not sort tablenames
mysql-test/r/information_schema.result:
  fix the test case for fix for bug #12315 - SHOW TABLE STATUS FROM `information_schema`; does not sort tablenames
mysql-test/r/information_schema_db.result:
  fix the test case for fix for bug #12315 - SHOW TABLE STATUS FROM `information_schema`; does not sort tablenames
sql/sql_show.cc:
  reorder the structure
  fix for bug #12315 - SHOW TABLE STATUS FROM `information_schema`; does not sort tablenames
sql/table.h:
  reorder the enum
  fix for bug #12315 - SHOW TABLE STATUS FROM `information_schema`; does not sort tablenames
2005-08-05 11:01:29 +02:00
unknown
705118d1f6 issue correct error message in case of view presence for duplicated table on update (BUG#10773)
frequently used command sequence replaced with inline function


BitKeeper/etc/config:
  logging switching off
mysql-test/r/lowercase_view.result:
  hided view underlying tables from error message
mysql-test/r/view.result:
  hided view underlying tables from error message
mysql-test/t/lowercase_view.test:
  hided view underlying tables from error message
mysql-test/t/view.test:
  hided view underlying tables from error message
sql/mysql_priv.h:
  subroutine which return correct error message
sql/share/errmsg.txt:
  new error message
sql/sql_base.cc:
  subroutine which issue correct error message in case of view presence for duplicated table on update
sql/sql_delete.cc:
  issue correct error message in case of view presence for duplicated table on update
sql/sql_insert.cc:
  issue correct error message in case of view presence for duplicated table on update
sql/sql_parse.cc:
  issue correct error message in case of view presence for duplicated table on update
sql/sql_update.cc:
  issue correct error message in case of view presence for duplicated table on update
sql/sql_view.cc:
  frequently used command sequence replaced with inline function
sql/table.cc:
  frequently used command sequence replaced with inline function
sql/table.h:
  frequently used command sequence replaced with inline function
2005-08-02 22:54:49 +03:00
unknown
8707870dd9 merge
BUILD/autorun.sh:
  Auto merged
BitKeeper/deleted/.del-var:
  Delete: mysql-test/var
BitKeeper/etc/config:
  Auto merged
configure.in:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/default.c:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/lex.h:
  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/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_bitmap.h:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/mi_extra.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisam/mi_preload.c:
  Auto merged
storage/myisam/mi_rsame.c:
  Auto merged
storage/myisam/mi_rsamepos.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_update.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamdef.h:
  Auto merged
storage/myisam/myisamlog.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/ndb/src/common/portlib/NdbMutex.c:
  Auto merged
storage/ndb/src/common/portlib/NdbThread.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
2005-07-19 21:56:10 +02:00
unknown
a32bf7fb82 Fix for bugs #5892/6182/8751/8758/10994 (based on Antony's patch)
"Triggers have the wrong namespace"
  "Triggers: duplicate names allowed"
  "Triggers: CREATE TRIGGER does not accept fully qualified names"
  "SHOW TRIGGERS"


mysql-test/r/information_schema.result:
  Added tests for new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
mysql-test/r/information_schema_db.result:
  INFORMATION_SCHEMA.TRIGGERS view was added.
mysql-test/r/rpl_sp.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/r/trigger.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
  Added test checking that triggers have database wide namespace.
  Added test for bug #8791 "Triggers: Allowed to create triggers on a subject
  table in a different DB".
mysql-test/r/view.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/t/information_schema.test:
  Added tests for new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
mysql-test/t/rpl_sp.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/t/trigger.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
  Added test checking that triggers have database wide namespace.
  Added test for bug #8791 "Triggers: Allowed to create triggers on a subject
  table in a different DB".
mysql-test/t/view.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
sql/handler.cc:
  Added .TRN tho the list of known file extensions assoicated with tables.
sql/item.h:
  trg_action_time_type/trg_event_type enums:
    Added TRG_ACTION_MAX/TRG_EVENT_MAX elements which should be used instead of
    magical values in various loops where we iterate through all types of trigger
    action times or/and trigger event types.
sql/lex.h:
  Added new symbol "TRIGGERS".
sql/mysql_priv.h:
  Added declaration of constant holding extension for trigger name (.TRN) files.
sql/mysqld.cc:
  Added statistical variable for SHOW TRIGGERS command.
sql/share/errmsg.txt:
  Added error message saying that one attempts to create trigger in wrong schema.
sql/sp.cc:
  Replaced magical values with TRG_EVENT_MAX/TRG_ACTION_MAX constants.
sql/sql_base.cc:
  open_unireg_entry():
    Now Table_triggers_list::check_n_load() has one more argument which
    controls whether we should prepare Table_triggers_list with fully functional
    triggers or load only their names.
sql/sql_lex.h:
  Added element for new SHOW TRIGGERS command to enum_sql_command enum.
sql/sql_parse.cc:
  prepare_schema_table():
    Added support for SHOW TRIGGERS statement.
sql/sql_show.cc:
  Added new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
sql/sql_table.cc:
  mysql_rm_table_part2():
    Replaced simple deletion of .TRG file with call to
    Table_triggers_list::drop_all_triggers which will also delete .TRN files
    for all triggers associated with table.
sql/sql_trigger.cc:
  Now triggers have database wide namespace. To support it we create special .TRN
  file with same name as trigger for each trigger. This file contains name of
  trigger's table so one does not need to specify it explicitly in DROP TRIGGER.
  Moreover DROP TRIGGER treats first part of trigger identifier as database name
  now. Updated mysql_create_or_drop_trigger() routine and
  Table_triggers_list::create_trigger()/drop_trigger()/check_n_load() methods
  accordingly. Added add_table_for_trigger() routine and
  Table_triggers_list::drop_all_triggers() method.
  
  Added Table_triggers_list::get_trigger_info() for obtaining trigger metadata.
sql/sql_trigger.h:
  Table_triggers_list:
    Use TRG_EVENT_MAX, TRG_ACTION_MAX instead of magic values.
    Added get_trigger_info() method for obtaining trigger's meta-data.
    Added drop_all_triggers() method which drops all triggers for table.
    Added declarations of trg_action_time_type_names/trg_event_type_names
    arrays which hold names of triggers action time types  and event types.
sql/sql_yacc.yy:
  Changed grammar for CREATE/DROP TRIGGER to support database wide trigger
  namespace. Added new SHOW TRIGGERS statement.
sql/table.h:
  enum enum_schema_tables:
    Added constant for new INFORMATION_SCHEMA.TRIGGERS view.
2005-07-19 20:06:49 +04:00
unknown
cd483c5520 Patch for push of wl1354 Partitioning 2005-07-18 13:31:02 +02:00
unknown
11f9e513d7 Implementation of Monty's idea: Now we can open mysql.proc table for lookup
of stored routines definitions even if we already have some tables open and
locked. To avoid deadlocks in this case we have to put certain restrictions
on locking of mysql.proc table.

This allows to use stored routines safely under LOCK TABLES without explicitly
mentioning mysql.proc in the list of locked tables. It also fixes bug #11554
"Server crashes on statement indirectly using non-cached function".


mysql-test/r/sp-error.result:
  Added test which checks that now we can read stored routines definitions
  under LOCK TABLES even if we have not locked mysql.proc explicitly. Also
  added check for restrictions which this ability puts on mysql.proc locking.
  Updated test for bug #9566 to correspond this new situation.
mysql-test/r/sp-threads.result:
  Added test for bug #11554 "Server crashes on statement indirectly using
  non-cached function".
mysql-test/t/sp-error.test:
  Added test which checks that now we can read stored routines definitions
  under LOCK TABLES even if we have not locked mysql.proc explicitly. Also
  added check for restrictions which this ability puts on mysql.proc locking.
  Updated test for bug #9566 to correspond this new situation.
mysql-test/t/sp-threads.test:
  Added test for bug #11554 "Server crashes on statement indirectly using
  non-cached function".
sql/lock.cc:
  get_lock_data():
   To be able to open and lock for reading system tables like 'mysql.proc',
   when we already have some tables opened and locked, and avoid deadlocks
   we have to disallow write-locking of these tables with any other tables.
sql/mysql_priv.h:
  open_table() has new parameter which allows to open table even if some-one
  has done a flush or holding namelock on it.
sql/share/errmsg.txt:
  Added error message saying that one cannot write-lock some of system tables
  with any other tables.
sql/sp.cc:
  open_proc_table_for_read()/close_proc_table():
    Added functions to be able open and close mysql.proc table when we already
    have some tables open and locked.
  open_proc_table_for_update():
    Added function to simplify opening of mysql.proc for updates.
  db_find_routine_aux()/db_find_routine()/db_update_routine()/...
    Moved responsibility for opening mysql.proc table from db_find_routine_aux()
    one level up, since this level knows better which type of table access for
    reading of for update it needs.
  sp_function_exists():
    Removed unused function.
sql/sp.h:
  sp_function_exists():
    Removed unused function.
sql/sql_base.cc:
  open_table():
    Added new parameter which allows to open table even if some-one has done a
    flush or holding namelock on it.
  open_unireg_entry():
    Mark 'mysql.proc' as a system table which has special restrictions on its
    locking, but thanks to them can be open and locked even if we already have
    some open and locked.
sql/sql_class.cc:
  Moved THD members holding information about open and locked tables to separate
  Open_tables_state class to be able to save/restore this state easier.
  Added THD::push_open_tables_state()/pop_open_tables_state() methods for
  saving/restoring this state.
sql/sql_class.h:
  Moved THD members holding information about open and locked tables to separate
  Open_tables_state class to be able to save/restore this state easier.
  Added THD::push_open_tables_state()/pop_open_tables_state() methods for
  saving/restoring this state.
sql/sql_lex.cc:
  Removed LEX::proc_table member which was not really used.
sql/sql_lex.h:
  Removed LEX::proc_table member which was not really used.
sql/sql_table.cc:
  open_table() has new parameter which allows to open table even if some-one
  has done a flush or holding namelock on it.
sql/table.h:
  Added TABLE_SHARE::system_table indicating that this table is system table
  like 'mysql.proc' and we want to be able to open and read-lock it even when
  we already have some tables open and locked (and because of this we have
  to put some restrictions on write locking it).
2005-07-13 13:48:13 +04:00
unknown
b4f595b95f Name resolution context added (BUG#6443)
include/my_bitmap.h:
  new bitmap operation
mysql-test/r/view.result:
  added warnings
  Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
mysql-test/t/view.test:
  Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
mysys/my_bitmap.c:
  new bitmap operation
sql/field.h:
  index of field in table added
sql/item.cc:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/item.h:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/item_cmpfunc.cc:
  table list removed from fix_fields() arguments
sql/item_cmpfunc.h:
  table list removed from fix_fields() arguments
sql/item_func.cc:
  table list removed from fix_fields() arguments
sql/item_func.h:
  table list removed from fix_fields() arguments
sql/item_row.cc:
  table list removed from fix_fields() arguments
sql/item_row.h:
  table list removed from fix_fields() arguments
sql/item_strfunc.cc:
  fixed server crash on NULL argument
sql/item_strfunc.h:
  table list removed from fix_fields() arguments
sql/item_subselect.cc:
  table list removed from fix_fields() arguments
sql/item_subselect.h:
  table list removed from fix_fields() arguments
sql/item_sum.cc:
  table list removed from fix_fields() arguments
sql/item_sum.h:
  table list removed from fix_fields() arguments
sql/item_timefunc.cc:
  table list removed from fix_fields() arguments
sql/item_timefunc.h:
  table list removed from fix_fields() arguments
sql/item_uniq.h:
  table list removed from fix_fields() arguments
sql/log_event.cc:
  Name resolution context added
sql/log_event.h:
  Name resolution context added
sql/mysql_priv.h:
  Name resolution context added
sql/set_var.cc:
  table list removed from fix_fields() arguments
sql/share/errmsg.txt:
  new error message
sql/sp.cc:
  Name resolution context added
sql/sp_head.cc:
  table list removed from fix_fields() arguments
sql/sp_head.h:
  Name resolution context added
sql/sql_base.cc:
  table list removed from fix_fields() arguments
  Name resolution context added
sql/sql_class.cc:
  renamed variable
sql/sql_delete.cc:
  Name resolution context added
sql/sql_derived.cc:
  Name resolution context added
sql/sql_do.cc:
  table list removed from fix_fields() arguments
sql/sql_handler.cc:
  Name resolution context added
sql/sql_help.cc:
  Name resolution context added
sql/sql_insert.cc:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/sql_lex.cc:
  Name resolution context added
sql/sql_lex.h:
  removed resolve mode (information stored into name resolution context)
sql/sql_load.cc:
  table list removed from fix_fields() arguments
sql/sql_olap.cc:
  Name resolution context added
sql/sql_parse.cc:
  Name resolution context added
sql/sql_prepare.cc:
  table list removed from fix_fields() arguments
sql/sql_select.cc:
  table list removed from fix_fields() arguments
sql/sql_show.cc:
  Name resolution context added
sql/sql_trigger.cc:
  table list removed from fix_fields() arguments
sql/sql_udf.h:
  table list removed from fix_fields() arguments
sql/sql_union.cc:
  Name resolution context added
sql/sql_update.cc:
  Name resolution context added
sql/sql_view.cc:
  Name resolution context added
sql/sql_view.h:
  table list removed from fix_fields() arguments
sql/sql_yacc.yy:
  Name resolution context added
sql/table.cc:
  Name resolution context added
  merged view processing moved
sql/table.h:
  merged view processing moved
2005-07-01 07:05:42 +03:00
unknown
906b210a4a Code cleanups during code reviews
Ensure we get error if INSERT IGNORE ... SELECT fails
Fixed wrong key_part->key_length usage in index_merge


client/mysql.cc:
  Code cleanups & simply optimizations
mysql-test/r/information_schema.result:
  Safety
mysql-test/t/information_schema.test:
  Safety
sql/ha_ndbcluster.cc:
  Code cleanups
sql/item.cc:
  Code cleanups
sql/item_subselect.cc:
  Code cleanups
sql/item_sum.cc:
  Code cleanups
sql/opt_range.cc:
  Made get_index_only_read_time() static (instad of inline) to increase portability (function was not declared before use)
  Simple optimization
  Fixed wrong key_part->key_length usage in index_merge
  Removed not used variable n_used_covered
  Indentation fixes & comment cleanups
sql/parse_file.cc:
  Code cleanups
sql/sql_base.cc:
  Code cleanups
sql/sql_bitmap.h:
  Added missing return
sql/sql_insert.cc:
  Ensure we get error if INSERT IGNORE ... SELECT fails
sql/sql_select.cc:
  Code cleanups
sql/sql_show.cc:
  Safety fix if a LOT of errors are ignored
sql/sql_update.cc:
  Code cleanups
sql/table.cc:
  Code cleanups
sql/table.h:
  Code cleanups
sql/uniques.cc:
  Code cleanups
strings/decimal.c:
  Simple optimization
  Code cleanups
2005-06-01 16:35:09 +03:00
unknown
1834f8899f Fix that we can read tables with the 'older' decimal format used in 5.0.3 & 5.0.4
We will however give a warning when opening such a table that users should use ALTER TABLE ... FORCE to fix
the table. In future release we will fix that REPAIR TABLE will be able to handle this case


sql/sql_lex.h:
  Support for ALTER TABLE ... FORCE
sql/sql_table.cc:
  CHECK TABLE now gives a note if table->s->crashed was set
sql/sql_yacc.yy:
  Support for ALTER TABLE ... FORCE
sql/table.cc:
  
  Fix that we can read tables with the 'older' decimal format used in 5.0.3 & 5.0.4
  (Now we store display length in the .frm table while we previously stored precision)
sql/table.h:
  Store in TABLE_SHARE version number of MySQL where table was created (or checked)
2005-05-25 18:33:36 +03:00
unknown
623444963e Manual merge
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
2005-05-10 16:41:47 -07:00
unknown
e02416c53c Many files:
Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
view.test:
  Added test case for bug #8528.
view.result:
  Added test case for bug #8528. Fixed other test cases.


mysql-test/r/view.result:
  Added test case for bug #8528. Fixed other test cases.
mysql-test/t/view.test:
  Added test case for bug #8528.
sql/sql_base.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_delete.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_insert.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_parse.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_prepare.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_select.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_update.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_view.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/table.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/table.h:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
2005-05-10 16:31:13 -07:00
unknown
ac6d9b2e50 Bug#7806 - insert on duplicate key and auto-update of timestamp
Merged fix for bugfix to 5.0.


sql/table.h:
  Auto merged
2005-04-22 17:13:18 +02:00
unknown
3431b2179f Bug#7806 - insert on duplicate key and auto-update of timestamp
A fix of the original patch.
Correctly clear a bit from an enum value.
2005-04-22 12:30:09 +02:00
unknown
ecb51a667e Hand merge, which needs fixes.
mysql-test/r/type_timestamp.result:
  Auto merged
mysql-test/t/type_timestamp.test:
  Auto merged
sql/table.h:
  Auto merged
ndb/test/ndbapi/Makefile.am:
  Using local 5.0 version.
sql/mysql_priv.h:
  Merged.
sql/sql_insert.cc:
  Merge needs fixes.
2005-04-20 15:50:29 +02:00
unknown
3be2d4897e Bug#7806 - insert on duplicate key and auto-update of timestamp
Modified the check for the timestamp field so that the flags for
the automatic for inserts and updates are cleared independently.


mysql-test/r/type_timestamp.result:
  Bug#7806 - insert on duplicate key and auto-update of timestamp
  The test result.
mysql-test/t/type_timestamp.test:
  Bug#7806 - insert on duplicate key and auto-update of timestamp
  The test case.
sql/mysql_priv.h:
  Bug#7806 - insert on duplicate key and auto-update of timestamp
  Made check_insert_fields() static. It is used only in sql_insert.cc.
sql/sql_insert.cc:
  Bug#7806 - insert on duplicate key and auto-update of timestamp
  Modified the check of the insert fields so that an explicit
  assignment of the timestamp field does only disable the automatic
  for inserts and retains the automatic for updates.
  Added a check if the update fields contain the timestamp field.
  In this case, the automatic on update is disabled, but not the
  automatic on insert. This is called from mysql_prepare_insert().
sql/table.h:
  Bug#7806 - insert on duplicate key and auto-update of timestamp
  Extended a comment to warn about usage of enum timestamp_auto_set_type.
2005-04-19 15:12:32 +02:00
unknown
a50bf2f06b - stackoverflow check added for view of view processing
- fixed bug in join view processing
- postreview fixes (BUG#9398 & BUG#8703)


sql/sql_base.cc:
  used original TABLE object to get correct name of table and db
sql/sql_view.cc:
  fixed bug of assigning select_lex for join view
sql/table.cc:
  comment fixed
  stack overflow check added
  new method for underlying base table finding
sql/table.h:
  comment fixed
  new method for underlying base table finding
2005-04-03 01:23:45 +03:00
unknown
5ac4670bf7 Fix for BUG#9213: GROUP BY returns wrong query results:
Make test_if_skip_sort_order() rebuild tab->ref if it decides to use an index
different from the index join optimizer has choosen.  


mysql-test/r/group_by.result:
  Testcase for BUG#9213
mysql-test/t/group_by.test:
  Testcase for BUG#9213
sql/table.h:
  Added comments about TABLE::used_keys
2005-03-30 15:57:42 +04:00
unknown
a7f5977c3c Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
there was no check of result of 
  table->file->write_row() function. When count of rows was
  more than table max_rows(HEAP table) the following recodrs
  were not inserted to the table
  -'schema_table_store_record' function is added. 
    The function checks result of write_row function
    and convert HEAP table to MyISAM if necessary
  - Result check after write_row is added into all 
    I_S function which store the records to I_S tables  


mysql-test/r/information_schema.result:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
mysql-test/t/information_schema.test:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
sql/sql_select.cc:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
sql/sql_show.cc:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
sql/table.h:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
2005-03-24 16:32:11 +03:00
unknown
892a6138ff Eliminate warnings noticed by VC7. This includes fixing my_mmap() on
Windows to call CreateFileMapping() with correct arguments, and
propogating the introduction of query_id_t to everywhere query ids are
passed around. (Bug #8826)


libmysql/libmysql.c:
  Make implicit cast explicit
myisam/mi_open.c:
  Make cast of value to smaller data size explicit
myisam/mi_packrec.c:
  Cast file size (my_off_t) to size_t for mmap
mysys/my_mmap.c:
  Fix Windows version of my_mmap() to use the right parameters
  for call to CreateFileMapping()
sql/field.cc:
  Use temporary value of correct type
sql/field.h:
  Use query_id_t for query_id value
sql/ha_berkeley.cc:
  Fix flag check
sql/ha_innodb.h:
  Use query_id_t for query_id value
sql/handler.cc:
  Explain opt_using_transactions calculation, and add cast
sql/handler.h:
  Fix forward declaration of COND
sql/item.cc:
  Fix val_bool() tests of val_int() to avoid implicit cast
sql/item_cmpfunc.cc:
  Fix typo in switch label
sql/item_func.cc:
  Make implicit cast explicit
sql/item_strfunc.cc:
  Now that query_id is a query_id_t, need to cast it to a ulong here
sql/item_subselect.cc:
  Fix test of value
sql/log.cc:
  Cast my_off_t used for file size to size_t for memory allocation
  Also cast my_off_t when using it to calculate the number of pages for TC log
  Cast total_ha_2pc to uchar when saving it
sql/mysql_priv.h:
  Move up query_id definition so it can be used more widely
sql/opt_range.cc:
  Add unused delete operator to prevent compiler warning
sql/set_var.cc:
  Cast value for max_user_connections
sql/sql_cache.cc:
  Remove unused label
sql/sql_class.h:
  Fix query id values to be of type query_id_t
sql/sql_db.cc:
  Move variable only used inside #ifdef within the #ifdef
sql/sql_help.cc:
  Remove unused label
sql/sql_insert.cc:
  Use query_id_t for query id values
sql/sql_lex.h:
  Add unused delete operator to prevent compiler warning
sql/sql_select.cc:
  Remove unused variable
  Make cast of value explicit
sql/sql_select.h:
  Use query_id_t for query id values
sql/sql_table.cc:
  Make comparison to function pointer explicit
sql/sql_update.cc:
  Use query_id_t for query id values
sql/table.h:
  Use query_id_t for query id values
strings/ctype-simple.c:
  Add cast of long value to (char) in expression
strings/ctype-ucs2.c:
  Add cast of long value to (char) in expression
strings/ctype-utf8.c:
  Make cast to smaller size explicit
2005-03-18 16:12:25 -08:00
unknown
b1095fb0cd Manual merge SP-locking improvements patch with current tree.
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_rcontext.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/sp_head.cc:
  Manual merge.
sql/sql_class.cc:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
2005-03-04 17:46:45 +03:00
unknown
ac9f68b9fa Better approach for prelocking of tables for stored routines execution
and some SP-related cleanups.

- We don't have separate stage for calculation of list of tables
  to be prelocked and doing implicit LOCK/UNLOCK any more.
  Instead we calculate this list at open_tables() and do implicit
  LOCK in lock_tables() (and UNLOCK in close_thread_tables()).
  Also now we support cases when same table (with same alias) is
  used several times in the same query in SP.

- Cleaned up execution of SP. Moved all common code which handles
  LEX and does preparations before statement execution or complex
  expression evaluation to auxilary sp_lex_keeper class. Now 
  all statements in SP (and corresponding instructions) that
  evaluate expression which can contain subquery have their
  own LEX.


mysql-test/r/lock.result:
  Replaced wrong error code with the correct one after fixing bug in
  SP-locking.
mysql-test/r/mysqldump.result:
  Added dropping of view which is used in test to its beginning.
mysql-test/r/sp.result:
  Added tests for improved SP-locking.
  Temporarily disabled tests for SHOW PROCEDURE STATUS and alike
  (Until Monty will allow to open mysql.proc under LOCK TABLES without
  mentioning it in lock list).
  Replaced wrong results of test for bug #5240 with correct results after
  fixing bug in handling of cursors.
mysql-test/t/lock.test:
  Replaced wrong error code with the correct one after fixing bug in
  SP-locking.
mysql-test/t/mysqldump.test:
  Added dropping of view which is used in test to its beginning.
mysql-test/t/sp.test:
  Added tests for improved SP-locking.
  Temporarily disabled tests for SHOW PROCEDURE STATUS and alike
  (Until Monty will allow to open mysql.proc under LOCK TABLES without
  mentioning it in lock list).
  Removed test for bug #1654 since we already test exactly this function
  in one of SP-locking tests.
  Removed comment about cursor's wrong behavior in test for bug #5240
  after fixing bug which was its cause.
sql/item_func.cc:
  Removed comment which is no longer true.
sql/mysql_priv.h:
  Changed open_tables() signature.
  Now its 2nd parameter is in/out since it can add elements to table list.
sql/sp.cc:
  sp_find_procedure():
   Added one more parameter which enforces cache only lookup.
  
  sp_merge_hash():
   Now uses its return value to indicate that first of two hashes changed
   as result of merge.
  
  sp_cache_routines():
   This function caches all stored routines used in query now.
sql/sp.h:
  - sp_find_procedure() now has one more parameter which enforces cache only
    lookup.
  - sp_merge_hash() now uses its return value to indicate that first of two
    hashes changed as result of merge.
  - sp_cache_routines() caches all stored routines now. So it does not need
    third argument any more.
sql/sp_head.cc:
  sp_head::sp_head():
   Added initialization of new m_spfuns and m_spprocs members.
  
  sp_head::execute():
   Let us save/restore part of thread context which can be damaged by
   execution of instructions.
  sp_head::execute_function()/execute_procedure():
   Now it is responsibility of caller to close tables used in
   subqueries which are passed as routine parameters.
  
  sp_head::restore_lex():
   Let us accumulate information about routines used by this one
   in new m_spfuns, m_spprocs hashes.
  
  sp_lex_keeper::reset_lex_and_exec_core()
   Main method of new auxilary sp_lex_keeper class to which instructions 
   delegate responsibility for handling LEX and preparations before
   executing statement or calculating complex expression.
  
  Since all instructions which calculate complex expression or execute
  command now use sp_lex_keeper they have to implement
  sp_instr::exec_core() method. Most of instruction specific logic
  has moved from sp_instr::execute() to this new method.
  
  Removed sp_instr_set_user_var class which is no longer used, because
  nowdays we allow execution of statements in stored functions and
  triggers.
  
  sp_merge_table_list() became sp_head::merge_table_list() method. It
  also treats sp_head::m_sptabs as multi-set of tables now.
  
  sp_hash_to_table_list() became sp_head::add_used_tables_to_table_list().
  It takes into account that sp_head::m_sptabs is multi-set and allocates
  object into persistent arena of PS.
  
  Removed sp_merge_table_hash(), sp_open_and_lock_tables(),
  sp_unlock_tables(), sp_merge_routine_tables() methods since they are not
  used by new prelocking mechanism.
  
  Added sp_add_sp_tables_to_table_list() which serves for adding tables needed
  by routines used in query to the query table list for prelocking.
sql/sp_head.h:
  class sp_head:
  - Added m_spfuns, m_spprocs members for storing names of routines used
    by this routine.
  - Added add_used_tables_to_table_list() method which allows to add
    tables needed by this routine to query's table list.
  - Converted sp_merge_table_list() to sp_head::merge_table_list() method.
  - Changed semantics of THD::m_sptabs. Now it is multi-set which contains
    only tables which are used by this routine and not routines that are
    called from this one.
  
  Removed sp_merge_routine_tables(), sp_merge_table_hash(),
  sp_open_and_lock_tables(), sp_unlock_tables() calls since they are not
  used for our prelocking list calculation.
  
  Added auxilary sp_lex_keeper class to which instructions delegate
  responsibility for handling LEX and preparations before executing
  statement or calculating complex expression. This class uses
  new sp_instr::exec_core() method which is responsible for executing
  instruction's core function after all preparations were made.
  
  All instructions which hold and calculate complex expression now have
  their own LEX (by aggregating sp_lex_keeper instance). sp_instr_stmt
  now uses sp_lex_keeper too.
  
  Removed sp_instr_set_user_var class which is no longer used, because
  nowdays we allow execution of statements in stored functions and
  triggers.
sql/sp_rcontext.cc:
  Now sp_cursor holds pointer to sp_lex_keeper instead of LEX.
sql/sp_rcontext.h:
  Now sp_cursor holds pointer to sp_lex_keeper instead of LEX.
sql/sql_acl.cc:
  acl_init(), grant_init():
    Now we use simple_open_n_lock_tables() instead of explicit
    calls to open_tables() and mysql_lock_tables().
sql/sql_base.cc:
  Implemented support for execution of statements in "prelocked" mode.
  
  When we have statement which uses stored routines explicitly or
  implicitly (via views or triggers) we have to open and lock all tables
  for these routines at the same time as tables for the main statement.
  In fact we have to do implicit LOCK TABLES at the begining of such
  statement and implict UNLOCK TABLES at its end. We call such mode
  "prelocked".
  
  When open_tables() is called for the statement tables which are needed
  for execution of routines used by it are added to its tables list
  (this process also caches all routines used). Implicit use of routines
  is discovered when we open view or table with trigger and apropriate
  tables are added to the table list at this moment. Statement which has
  such extra tables in its list (well actually any that uses functions)
  is marked as requiring prelocked mode for its execution.
  
  When lock_tables() sees such statement it will issue implicit LOCK TABLES
  for this extended table list instead of doing usual locking, it will also
  set THD::prelocked_mode to indicate that we are in prelocked mode.
  
  When open_tables()/lock_tables() are called for statement of stored
  routine (substatement), they notice that we are running in prelocked mode
  and use one of prelocked tables from those that are not used by upper
  levels of execution.
  
  close_thread_tables() for substatement won't really close tables used
  but will mark them as free for reuse instead.
  
  Finally when close_thread_tables() is called for the main statement it
  really unlocks and closes all tables used.
  
  Everything will work even if one uses such statement under real LOCK
  TABLES (we are simply not doing implicit LOCK/UNLOCK in this case).
sql/sql_class.cc:
  Added initialization of THD::prelocked_mode member.
sql/sql_class.h:
  - Added prelocked_mode_type enum and THD::prelocked_mode member
    which are used for indication whenever "prelocked mode" is on 
    (i.e. that statement uses stored routines and is executed under
     implicit LOCK TABLES).
  - Removed THD::shortcut_make_view which is no longer needed.
    We use TABLE_LIST::prelocking_placeholder for the same purprose
    now.
sql/sql_handler.cc:
  Changed open_tables() invocation.
  Now its 2nd parameter is in/out since it can add elements to table list.
sql/sql_lex.cc:
  lex_start():
    Added initialization of LEX::query_tables_own_last.
    Unused LEX::sptabs member was removed.
  st_lex::unlink_first_table()/link_first_table_back():
    We should update LEX::query_tables_last properly if table list
    contains(ed) only one element.
sql/sql_lex.h:
  LEX:
  - Removed sptabs member since it is no longer used.
  - Added query_tables_own_last member, which if non-0 indicates that
    statement requires prelocking (implicit LOCK TABLES) for its execution
    and points to last own element in query table list. If it is zero
    then this query does not need prelocking.
  - Added requires_prelocking(), mark_as_requiring_prelocking(),
    first_not_own_table() inline methods to incapsulate and simplify
    usage of this new member.
sql/sql_parse.cc:
  dispatch_command():
    To properly leave prelocked mode when needed we should call
    close_thread_tables() even if there are no open tables.
  mysql_execute_command():
  - Removed part of function which were responsible for doing implicit
    LOCK TABLES before statement execution if statement used stored 
    routines (and doing UNLOCK TABLES at the end).
    Now we do all this in open_tables()/lock_tables()/close_thread_tables()
    instead.
  - It is also sensible to reset errors before execution of statement
    which uses routines.
  - SQLCOM_DO, SQLCOM_SET_OPTION, SQLCOM_CALL
    We should always try to open tables because even if statement has empty
    table list, it can call routines using tables, which should be preopened
    before statement execution.
  - SQLCOM_CALL
    We should not look up routine called in mysql.proc, since it should be
    already cached by this moment by open_tables() call.
  - SQLCOM_LOCK_TABLES
    it is better to use simple_open_n_lock_tables() since we want to avoid
    materialization of derived tables for this command.
sql/sql_prepare.cc:
  mysql_test_update():
    Changed open_tables() invocations. Now its 2nd parameter is in/out
    since it can add elements to table list.
  check_prepared_statement():
    Since now we cache all routines used by statement in open_tables() we 
    don't need to do it explicitly.
  mysql_stmt_prepare():
    Now we should call close_thread_tables() when THD::lex points to the
    LEX of statement which opened tables.
  reset_stmt_for_execute():
    Commented why we are resetting all tables in table list.
sql/sql_trigger.h:
  Table_triggers_list::process_triggers():
    We should surpress sending of ok packet when we are calling trigger's
    routine, since now we allow statements in them.
sql/sql_update.cc:
  Changed open_tables() invocations.
  Now its 2nd parameter is in/out since it can add elements to table list.
sql/sql_view.cc:
  mysql_make_view():
  - Removed handling of routines used in view. Instead we add tables which
    are needed for their execution to statement's table list in 
    open_tables().
  - Now we use TABLE_LIST::prelocking_placeholder instead of 
    THD::shortcut_make_view for indicating that view is opened
    only to discover which tables and routines it uses (this happens
    when we build extended table list for prelocking). Also now we try
    to avoid to modify main LEX in this case (except of its table list).
  - Corrected small error we added tables to the table list of the main
    LEX without updating its query_tables_last member properly.
sql/sql_yacc.yy:
  Now each expression which is used in SP statements and can contain
  subquery has its own LEX. This LEX is stored in corresponding sp_instr
  object and used along with Item tree for expression calculation.
  
  We don't need sp_instr_set_user_var() anymore since now we allow
  execution of statements in stored functions and triggers.
sql/table.h:
  Added TABLE_LIST::prelocking_placeholder member for distinguishing
  elements of table list which does not belong to the statement itself
  and added there only for prelocking (as they are to be used by routines
  called by this statement).
sql/tztime.cc:
  my_tz_init():
    Now we use more simplier simple_open_n_lock_tables() call instead of 
    open_tables()/lock_tables() pair.
2005-03-04 16:35:28 +03:00
unknown
2860a7723e Fixes for bug#8115 "Server Crash with prepared statement"
and bug#8849 "problem with insert statement with table alias's": 
make equality propagation work in stored procedures and prepared 
statements.
Equality propagation can change AND/OR structure of ON expressions,
so the fix is to provide each execution of PS/SP with it's own
copy of AND/OR tree. We have been doing that already for WHERE clauses,
now ON clauses are also copied.


mysql-test/r/ps.result:
  Bug#8115: test results fixed.
mysql-test/r/sp.result:
  Bug#8849: test results fixed.
mysql-test/t/ps.test:
  A test case for Bug#8115 "Server Crash with prepared statement".
mysql-test/t/sp.test:
  A test case for Bug#8849 "problem with insert statement with table 
  alias's".
sql/item_cmpfunc.cc:
  Comment a parse tree transformation.
sql/item_cmpfunc.h:
  Comment how Item_equal works with PS/SP.
sql/mysql_priv.h:
  Add declaration for init_stmt_after_parse.
sql/sp_head.cc:
  Call init_stmt_after_parse in restore_lex(), which is used to
  grab TABLE_LIST and SELECT_LEX list of a parsed substatement of
  stored procedure. This is a necessary post-init step which 
  must be done for any statement which can be executed many times.
sql/sql_prepare.cc:
  Implement init_stmt_after_parse() which prepares AND/OR
  structure of all ON expressions and WHERE clauses of a statement
  for copying.
sql/sql_select.cc:
  Implementation of equality propagation inspected with regard to 
  prepared statements and stored procedures. We now restore
  AND/OR structure of every ON expression in addition to AND/OR
  structure of WHERE clauses when reexecuting a PS/SP.
sql/table.h:
  Add declaration for TABLE::prep_on_expr.
2005-03-03 17:38:59 +03:00
unknown
2359f1fa3e Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into gluh.mysql.r18.ru:/home/gluh/MySQL/mysql-5.0


sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
2005-02-07 11:57:14 +03:00
unknown
0989e1afd9 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-outer-joins-cleanup


sql/mysql_priv.h:
  Auto merged
sql/table.h:
  Auto merged
2005-02-05 18:18:06 +03:00
unknown
d52afba56a Outer joins cleanup: Remove TABLE::outer_join and use TABLE::maybe_null only (2nd patch after Monty's comments).
sql/mysql_priv.h:
  Outer joins cleanup: Remove TABLE::outer_join and use TABLE::maybe_null only.
sql/opt_range.cc:
  Outer joins cleanup: Remove TABLE::outer_join and use TABLE::maybe_null only.
sql/sql_base.cc:
  Outer joins cleanup: Remove TABLE::outer_join and use TABLE::maybe_null only.
sql/sql_select.cc:
  Outer joins cleanup: Remove TABLE::outer_join and use TABLE::maybe_null only.
sql/table.h:
  Outer joins cleanup: 
   * Remove TABLE::outer_join and use TABLE::maybe_null only.
   * Added comments.
2005-02-05 18:16:29 +03:00
unknown
2b0a3dbe9e Merged "query cache for ndb" to 5.0
BitKeeper/etc/logging_ok:
  auto-union
sql/ha_innodb.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_cache.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/ha_innodb.h:
  Hand merged
sql/ha_ndbcluster.cc:
  Merge with gathering of stats
sql/sql_cache.cc:
  Use new table def cache
sql/table.h:
  table.h had been cleaned up
2005-02-03 09:33:48 +01:00
unknown
e9db02074f Additional fix for WL#1629: SHOW with WHERE(discussed with PeterG)
- Do not allow a column list as part of SHOW WITH WHERE task.
 - The WHERE clause must accept field names which are
   valid in SHOW, not INFORMATION_SCHEMA names.


mysql-test/r/information_schema.result:
  The test correction
mysql-test/t/information_schema.test:
  The test correction
sql/sql_base.cc:
  Process field translation table for 'show' commands
sql/sql_parse.cc:
  schema_table_seformed is always true for 'show' commands
sql/sql_show.cc:
  - Do not allow a column list as part of SHOW WITH WHERE task.
  - The WHERE clause must accept field names which are
    valid in SHOW, not INFORMATION_SCHEMA names.
sql/sql_yacc.yy:
  Do not allow a column list as part of SHOW WITH WHERE task
sql/table.h:
  A new 'schema_table_reformed' variable in table_list
  If schema_table_reformed is true select items should be 
  translated using field translation table
2005-01-24 18:44:54 +03:00
unknown
24a0275722 Fixed memory reference errors found by valgrind
sql/ha_federated.cc:
  Change mode to -rw-rw-r--
myisam/mi_create.c:
  Ensure that all referenced memory is reset
mysql-test/r/type_timestamp.result:
  More tests
mysql-test/t/func_compress.test:
  Added comment
mysql-test/t/type_timestamp.test:
  More tests
sql/field.h:
  Count number of varchars in table
sql/item_cmpfunc.cc:
  Safety fix (to avoid warning from valgrind)
sql/opt_range.cc:
  Simple optimzation
sql/sql_acl.cc:
  Safety fix (to avoid warning from valgrind)
sql/sql_parse.cc:
  Safety fix for prepared statements
sql/sql_show.cc:
  Move variable declarations first in function
  Remove hidden variable (it)
  Remove accessing freed memory (table_list->table_name)
sql/sql_update.cc:
  Compare records with varchars correctly
sql/table.cc:
  Safety fix when running with purify/valgrind
  Fix wrong memory reference in case of errors
sql/table.h:
  Added counting of varchar fields
strings/ctype-mb.c:
  Fill max_str properly
2005-01-12 03:38:53 +02:00
unknown
8ff8867251 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


sql/item_func.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
2005-01-06 13:31:31 +02:00
unknown
acf76e3b88 First stage of table definition cache
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
Created Field::make_field() and made Field_num::make_field() to call this
Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
Renamed TABLE_SHARE->real_name to table_name
Renamed TABLE->table_name to alias
Renamed TABLE_LIST->real_name to table_name


include/myisam.h:
  Added const before names
mysql-test/r/group_min_max.result:
  Make results repeatable
mysql-test/t/group_min_max.test:
  Make results repeatable
sql/field.cc:
  Created Field::make_field() and made Field_num::make_field() to call this
  Use TABLE_SHARE
  Use sql_strmake() instead of sql_memdup() to simplify code
sql/field.h:
  Changed table_name to be pointer to table_name. This allows us to change alias for all fields by just changing one pointer.
  Use TABLE_SHARE
sql/field_conv.cc:
  Use TABLE_SHARE
sql/filesort.cc:
  Use TABLE_SHARE
sql/ha_berkeley.cc:
  Use TABLE_SHARE
sql/ha_heap.cc:
  Use TABLE_SHARE
sql/ha_innodb.cc:
  Use TABLE_SHARE
sql/ha_myisam.cc:
  Use TABLE_SHARE
sql/ha_myisammrg.cc:
  Use TABLE_SHARE
  Change some pointer handling to use const char*
sql/ha_ndbcluster.cc:
  Use TABLE_SHARE
sql/handler.cc:
  Use TABLE_SHARE
sql/item.cc:
  Use TABLE_SHARE
sql/item_func.cc:
  Use TABLE_SHARE
sql/item_subselect.cc:
  Use TABLE_SHARE
sql/item_sum.cc:
  Use TABLE_SHARE
sql/key.cc:
  Use TABLE_SHARE
sql/lock.cc:
  Use TABLE_SHARE
sql/log_event.cc:
  real_name -> table_name
sql/mysql_priv.h:
  Use TABLE_SHARE
sql/opt_range.cc:
  Use TABLE_SHARE
sql/opt_sum.cc:
  Use TABLE_SHARE
sql/records.cc:
  Use TABLE_SHARE
sql/repl_failsafe.cc:
  real_name -> table_name
sql/slave.cc:
  Use TABLE_SHARE
sql/sp.cc:
  Use TABLE_SHARE
sql/sp_head.cc:
  real_name -> table_name
sql/sql_acl.cc:
  Use TABLE_SHARE
  removed unnecessary assert
  fixed indentation
  changed some char * -> const char*
sql/sql_acl.h:
  changed some char* -> const char*
sql/sql_base.cc:
  Use TABLE_SHARE
sql/sql_cache.cc:
  Use TABLE_SHARE
sql/sql_class.cc:
  Use TABLE_SHARE
sql/sql_db.cc:
  real_name -> table_name
sql/sql_delete.cc:
  Use TABLE_SHARE
sql/sql_derived.cc:
  Use TABLE_SHARE
sql/sql_handler.cc:
  Use TABLE_SHARE
sql/sql_help.cc:
  Use TABLE_SHARE
sql/sql_insert.cc:
  Use TABLE_SHARE
sql/sql_load.cc:
  Use TABLE_SHARE
sql/sql_parse.cc:
  Use TABLE_SHARE
sql/sql_rename.cc:
  real_name -> table_name
sql/sql_select.cc:
  Use TABLE_SHARE
  table->blob_fields now points to field offsets, not fields
  tmp_table->table_name now points to alias name
sql/sql_show.cc:
  Use TABLE_SHARE
sql/sql_table.cc:
  Use TABLE_SHARE
sql/sql_test.cc:
  Use TABLE_SHARE
sql/sql_trigger.cc:
  Use TABLE_SHARE
sql/sql_udf.cc:
  Use TABLE_SHARE
sql/sql_union.cc:
  real_name -> table_name
sql/sql_update.cc:
  Use TABLE_SHARE
sql/sql_view.cc:
  Use TABLE_SHARE
sql/table.cc:
  Split TABLE to TABLE and TABLE_SHARE
  Changed blob_field to be field offsets instead of pointer to fields
  Only initialize table->s->default_values with default record (not all table->record[#])
  Some indentation changes
sql/table.h:
  Split TABLE to TABLE and TABLE_SHARE
sql/tztime.cc:
  real_name -> table_name
sql/unireg.cc:
  Use TABLE_SHARE
sql/unireg.h:
  Use TABLE_SHARE
2005-01-06 13:00:13 +02:00
unknown
47dc78e6a3 fixed views with PS protocol
mysql-test/r/view.result:
  query cache part moved to separate test
mysql-test/t/view.test:
  query cache part moved to separate test
sql/item_func.cc:
  fixed for safety
sql/sql_base.cc:
  do not use real table call with view
  fixed wrapping * substitured items
  fixed fix_fields call parameter (refference)
sql/sql_yacc.yy:
  added initialisation of SELECT in commands which can use subqueries
sql/table.cc:
  fised fix_fields call parameter
sql/table.h:
  new view specific method
2005-01-05 16:48:23 +02:00
unknown
2bcaed348d Better handling of ensuring that setup_tables() are not called twice
This fixed a bug in prepared statements when used with outher joins
Fixed a bug in SUM(DISTINCT) when used with prepared statements.
Some safety fixes in test scripts to ensure that previous test failures shouldn't affect other tests


mysql-test/r/mysqldump.result:
  Safety fix if a previous test would fail
mysql-test/r/show_check.result:
  Safety fix if a previous test would fail
mysql-test/r/sp.result:
  Fix for --ps-protocol
mysql-test/r/synchronization.result:
  Safety fix if a previous test would fail
mysql-test/r/system_mysql_db.result:
  Safety fix if a previous test would fail
mysql-test/t/mysqldump.test:
  Safety fix if a previous test would fail
mysql-test/t/select.test:
  Safety fix if a previous test would fail
mysql-test/t/show_check.test:
  Safety fix if a previous test would fail
mysql-test/t/sp.test:
  fix for --ps-protocol
mysql-test/t/strict.test:
  Fix for --ps-protocol
mysql-test/t/synchronization.test:
  Safety fix if a previous test would fail
mysql-test/t/system_mysql_db.test:
  Safety fix if a previous test would fail
sql/item_sum.cc:
  Fix bug in SUM(DISTINCT...) when using with prepared statements
sql/item_sum.h:
  Fix bug in SUM(DISTINCT...) when using with prepared statements
sql/mysql_priv.h:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_base.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_insert.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_parse.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_prepare.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_select.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_union.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/sql_update.cc:
  Better handling of ensuring that setup_tables() are not called twice
sql/table.h:
  Better handling of ensuring that setup_tables() are not called twice
2005-01-03 21:04:33 +02:00
unknown
e055be6658 Remove clear_insert_values() because it was far from trivial to handle the cleanup in all cases
(Old code failed for INSERT ... ON DUPLICATE with prepared statements) 
Instead, always reset table->insert_values on open.


mysql-test/t/trigger.test:
  Fix test for --ps-protocol
sql/sql_base.cc:
  Clear insert_values on open_table
sql/sql_insert.cc:
  Remove clear_insert_values()
sql/sql_parse.cc:
  Remove clear_insert_values()
sql/sql_prepare.cc:
  Remove clear_insert_values()
sql/table.cc:
  Remove clear_insert_values()
sql/table.h:
  Remove clear_insert_values()
2005-01-03 13:56:23 +02:00
unknown
12a215b083 Merge with global tree
BitKeeper/etc/logging_ok:
  auto-union
client/mysqltest.c:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/include/dict0dict.h:
  Auto merged
libmysql/errmsg.c:
  Auto merged
myisam/mi_open.c:
  Auto merged
myisam/mi_write.c:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/show_check.result:
  Auto merged
mysql-test/t/derived.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/system_mysql_db_fix.test:
  Auto merged
scripts/mysql_install_db.sh:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.h:
  Auto merged
2004-12-31 00:50:30 +02:00
unknown
525242d37f wl#1629 SHOW with WHERE(final part, after review)
added syntax:
  'show variables where', 'show status where', 'show open tables where'


mysql-test/r/grant_cache.result:
  wl#1629 SHOW with WHERE(final part,after review)
mysql-test/r/information_schema.result:
  wl#1629 SHOW with WHERE(final part,after review)
mysql-test/r/query_cache.result:
  wl#1629 SHOW with WHERE(final part,after review)
mysql-test/r/temp_table.result:
  wl#1629 SHOW with WHERE(final part,after review)
mysql-test/r/union.result:
  wl#1629 SHOW with WHERE(final part,after review)
mysql-test/t/information_schema.test:
  wl#1629 SHOW with WHERE(final part,after review)
mysql-test/t/query_cache.test:
  wl#1629 SHOW with WHERE(final part,after review)
sql/item.cc:
  wl#1629 SHOW with WHERE(final part,after review)
sql/mysql_priv.h:
  wl#1629 SHOW with WHERE(final part,after review)
sql/sql_parse.cc:
  wl#1629 SHOW with WHERE(final part,after review)
sql/sql_select.cc:
  wl#1629 SHOW with WHERE(final part,after review)
sql/sql_show.cc:
  wl#1629 SHOW with WHERE(final part,after review)
sql/sql_yacc.yy:
  wl#1629 SHOW with WHERE(final part,after review)
sql/table.h:
  wl#1629 SHOW with WHERE(final part,after review)
2004-12-30 15:20:40 +03:00
unknown
bb2d3eaa30 Merge with 4.1
BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
Build-tools/Do-compile:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Auto merged
client/Makefile.am:
  Auto merged
client/mysql.cc:
  Auto merged
BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_base.h:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/dict/dict0load.c:
  Auto merged
innobase/include/dict0dict.h:
  Auto merged
innobase/include/row0mysql.h:
  Auto merged
innobase/os/os0file.c:
  Auto merged
innobase/srv/srv0srv.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/mi_check.c:
  Auto merged
myisam/mi_rnext_same.c:
  Auto merged
myisam/mi_write.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/ctype_ujis.result:
  Auto merged
mysql-test/r/gis-rtree.result:
  Auto merged
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/metadata.result:
  Auto merged
mysql-test/r/ndb_alter_table.result:
  Auto merged
mysql-test/r/ps_1general.result:
  Auto merged
mysql-test/r/insert_update.result:
  Auto merged
mysql-test/r/timezone2.result:
  Auto merged
mysql-test/r/type_enum.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/ps_1general.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/system_mysql_db_fix.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
ndb/include/ndbapi/NdbConnection.hpp:
  Auto merged
ndb/include/ndbapi/NdbDictionary.hpp:
  Auto merged
ndb/src/common/util/version.c:
  Auto merged
ndb/src/kernel/blocks/dbacc/DbaccInit.cpp:
  Auto merged
ndb/src/kernel/blocks/dbacc/Makefile.am:
  Auto merged
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
ndb/src/kernel/blocks/dblqh/DblqhInit.cpp:
  Auto merged
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
ndb/src/kernel/blocks/dbtux/Dbtux.hpp:
  Auto merged
ndb/src/ndbapi/NdbBlob.cpp:
  Auto merged
ndb/src/ndbapi/NdbConnection.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionary.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  Auto merged
ndb/src/ndbapi/NdbOperationExec.cpp:
  Auto merged
ndb/src/ndbapi/NdbScanOperation.cpp:
  Auto merged
ndb/test/ndbapi/Makefile.am:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
scripts/mysql_install_db.sh:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_create.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_geofunc.cc:
  Auto merged
sql/item_row.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/password.c:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_do.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/examples/ha_archive.cc:
  Auto merged
sql/strfunc.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.h:
  Auto merged
sql/udf_example.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
Makefile.am:
  Simple merge
client/mysqldump.c:
  Simple merge
configure.in:
  Simple merge
libmysqld/lib_sql.cc:
  Automatic merge
mysql-test/r/func_str.result:
  Automatic merge
mysql-test/r/grant.result:
  simple merge
mysql-test/r/multi_update.result:
  automatc merge
mysql-test/r/ps.result:
  automatic merge
mysql-test/r/ps_2myisam.result:
  Automatic merge
mysql-test/r/ps_3innodb.result:
  Automatic merge
mysql-test/r/ps_4heap.result:
  Automatic merge
mysql-test/r/ps_5merge.result:
  Automatic merge
mysql-test/r/ps_6bdb.result:
  Automatic merge
mysql-test/r/ps_7ndb.result:
  Automatic merge
mysql-test/r/show_check.result:
  Automatic merge
mysql-test/r/subselect.result:
  Automatic merge
mysql-test/t/grant.test:
  Automatic merge
mysql-test/t/multi_update.test:
  Automatic merge
mysql-test/t/ps.test:
  Automatic merge
mysql-test/t/show_check.test:
  Automatic merge
ndb/docs/wl2077.txt:
  merge
ndb/src/mgmsrv/main.cpp:
  merge
scripts/mysql_fix_privilege_tables.sh:
  merge
sql/item.cc:
  Merge (difficult)
sql/item.h:
  simple merge
sql/item_cmpfunc.h:
  Automatic merge
sql/item_subselect.cc:
  Simple merge
sql/item_subselect.h:
  Automatic merge
sql/mysql_priv.h:
  Simple merge
sql/slave.h:
  Automatic merge
sql/sql_base.cc:
  Removed code that was backported to 4.1
sql/sql_class.h:
  Merge (some code moved to sql_insert.cc)
sql/sql_db.cc:
  simple merge
sql/sql_insert.cc:
  Merge (difficult as logic had changed both in 4.1 and 5.0)
  Some coded moved here from sql_class.h
sql/sql_parse.cc:
  Merge (difficult)
sql/sql_prepare.cc:
  Simple merge
sql/sql_select.cc:
  Automatic merge
sql/sql_table.cc:
  Simple merge
sql/sql_update.cc:
  Difficult merge because of different logic for multi-updates
sql/sql_yacc.yy:
  Simple merge
tests/client_test.c:
  Simple merge
2004-12-22 13:54:39 +02:00
unknown
e3f1d56252 Fix for bug #7213: information_schema: redundant non-standard TABLE_NAMES table 2004-12-18 13:49:13 +03:00
unknown
5ffe6a7b3a Merge
sql/ha_innodb.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/table.h:
  Auto merged
2004-12-16 09:37:29 +01:00
unknown
c77391b94f Fix for BUG#5837 merged from 4.0
sql/sql_select.cc:
  Auto merged
sql/table.h:
  Auto merged
2004-12-11 15:55:50 +03:00
unknown
8e4251dd85 Fix for BUG#5837 - attempt 3.
Call mark_as_null_row in join_read_const and join_read_system.


mysql-test/r/multi_update.result:
  Testcase for BUG#5837
mysql-test/t/multi_update.test:
  Testcase for BUG#5837
sql/table.h:
  Added comments
2004-12-11 15:51:52 +03:00
unknown
8379b61efb Merge with new VARCHAR code
configure.in:
  Auto merged
BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003:
  Auto merged
BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
  Auto merged
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
heap/hp_create.c:
  Auto merged
heap/hp_delete.c:
  Auto merged
heap/hp_hash.c:
  Auto merged
heap/hp_write.c:
  Auto merged
include/decimal.h:
  Auto merged
include/m_ctype.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
myisam/mi_check.c:
  Auto merged
myisam/mi_create.c:
  Auto merged
myisam/mi_write.c:
  Auto merged
mysql-test/r/ctype_tis620.result:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/ps_1general.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/strict.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/endspace.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/ps_1general.test:
  Auto merged
mysql-test/t/strict.test:
  Auto merged
mysql-test/t/type_blob.test:
  Auto merged
ndb/src/common/util/NdbSqlUtil.cpp:
  Auto merged
scripts/mysql_fix_privilege_tables.sh:
  Auto merged
sql/field.h:
  Auto merged
sql/field_conv.cc:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/structs.h:
  Auto merged
sql/table.cc:
  Auto merged
strings/ctype-czech.c:
  Auto merged
strings/ctype-uca.c:
  Auto merged
strings/ctype-utf8.c:
  Auto merged
strings/ctype-win1250ch.c:
  Auto merged
strings/decimal.c:
  Auto merged
tests/client_test.c:
  Auto merged
mysql-test/r/bdb.result:
  Merge with VARCHAR code
mysql-test/r/heap.result:
  Merge with VARCHAR code
mysql-test/r/innodb.result:
  Merge with VARCHAR code
mysql-test/r/select.result.es:
  Merge with VARCHAR code
mysql-test/t/bdb.test:
  Merge with VARCHAR code
mysql-test/t/heap.test:
  Merge with VARCHAR code
mysql-test/t/innodb.test:
  Merge with VARCHAR code
sql/field.cc:
  Merge with VARCHAR code
sql/item.cc:
  Merge with VARCHAR code
sql/sql_acl.cc:
  Merge with VARCHAR code
sql/sql_parse.cc:
  Merge with VARCHAR code
sql/sql_table.cc:
  Merge with VARCHAR code
sql/sql_update.cc:
  Merge with VARCHAR code
sql/table.h:
  Merge with VARCHAR code
strings/ctype-mb.c:
  Don't pad my_like_range with max_str for simple LIKE expression
strings/ctype-tis620.c:
  Merge with VARCHAR code
strings/ctype-ucs2.c:
  Added new argument to my_strnncollsp_ucs2()
  Simply code
2004-12-06 19:18:35 +02:00
unknown
a8ea31fae6 Add support for up to VARCHAR (size up to 65535)
Renamed HA_VAR_LENGTH to HA_VAR_LENGTH_PART
Renamed in all files FIELD_TYPE_STRING and FIELD_TYPE_VAR_STRING to MYSQL_TYPE_STRING and MYSQL_TYPE_VAR_STRING to make it easy to catch all possible errors
Added support for VARCHAR KEYS to heap
Removed support for ISAM
Now only long VARCHAR columns are changed to TEXT on demand (not CHAR)
Internal temporary files can now use fixed length tables if the used VARCHAR columns are short


BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
  Delete: sql/ha_isam.cc
BitKeeper/deleted/.del-_cache.c~b5d80b5c3ae233b1:
  Delete: isam/_cache.c
BitKeeper/deleted/.del-_dbug.c~88d7964ae5e3c9bd:
  Delete: isam/_dbug.c
BitKeeper/deleted/.del-_dynrec.c~48dd758f5a5450df:
  Delete: isam/_dynrec.c
BitKeeper/deleted/.del-_key.c~ce62d47a6c681084:
  Delete: isam/_key.c
BitKeeper/deleted/.del-_locking.c~dea4cdc6ea425c67:
  Delete: isam/_locking.c
BitKeeper/deleted/.del-_packrec.c~47ae1b16c007e9be:
  Delete: isam/_packrec.c
BitKeeper/deleted/.del-_page.c~148b1a613d052ee8:
  Delete: isam/_page.c
BitKeeper/deleted/.del-_search.c~f509292aa1ff18ff:
  Delete: isam/_search.c
BitKeeper/deleted/.del-_statrec.c~58d9263b3475d58b:
  Delete: isam/_statrec.c
BitKeeper/deleted/.del-changed.c~d075de80a314b02d:
  Delete: isam/changed.c
BitKeeper/deleted/.del-close.c~fd62629496ee5bcc:
  Delete: isam/close.c
BitKeeper/deleted/.del-create.c~96cecc433c0c2242:
  Delete: isam/create.c
BitKeeper/deleted/.del-delete.c~65ee8daaa75a14b6:
  Delete: isam/delete.c
BitKeeper/deleted/.del-extra.c~706f29d72beb2565:
  Delete: isam/extra.c
BitKeeper/deleted/.del-info.c~96cfb747af8da0d:
  Delete: isam/info.c
BitKeeper/deleted/.del-isamchk.c~c0f59c2687d2248f:
  Delete: isam/isamchk.c
BitKeeper/deleted/.del-isamlog.c~85b6b31c6e2b8519:
  Delete: isam/isamlog.c
BitKeeper/deleted/.del-log.c~55a973013d55cade:
  Delete: isam/log.c
BitKeeper/deleted/.del-open.c~95b3b75042fae00a:
  Delete: isam/open.c
BitKeeper/deleted/.del-pack_isam.c~43801f0df7504834:
  Delete: isam/pack_isam.c
BitKeeper/deleted/.del-panic.c~f7fd71605324f8f3:
  Delete: isam/panic.c
BitKeeper/deleted/.del-range.c~142f1f8ac4948082:
  Delete: isam/range.c
BitKeeper/deleted/.del-rfirst.c~66f494291dc005d3:
  Delete: isam/rfirst.c
BitKeeper/deleted/.del-rkey.c~cc54c6498352f999:
  Delete: isam/rkey.c
BitKeeper/deleted/.del-rlast.c~d1fe1866139e9866:
  Delete: isam/rlast.c
BitKeeper/deleted/.del-rnext.c~b308eaa1e11ea7de:
  Delete: isam/rnext.c
BitKeeper/deleted/.del-rprev.c~b359f71fdea4bbce:
  Delete: isam/rprev.c
BitKeeper/deleted/.del-rrnd.c~7fcfcce88d4a5200:
  Delete: isam/rrnd.c
BitKeeper/deleted/.del-rsame.c~75a62d5548103a15:
  Delete: isam/rsame.c
BitKeeper/deleted/.del-rsamepos.c~5b5652dd2cda6d5d:
  Delete: isam/rsamepos.c
BitKeeper/deleted/.del-sort.c~e2e56b5a37ce86f4:
  Delete: isam/sort.c
BitKeeper/deleted/.del-static.c~3a1354b84f4a9cc7:
  Delete: isam/static.c
BitKeeper/deleted/.del-test1.c~64d52e9412d457ed:
  Delete: isam/test1.c
BitKeeper/deleted/.del-test2.c~2f9a632cab572958:
  Delete: isam/test2.c
BitKeeper/deleted/.del-test3.c~e8a7a4afe8a087:
  Delete: isam/test3.c
BitKeeper/deleted/.del-isamdef.h~ac8d49e7e2201c66:
  Delete: isam/isamdef.h
BitKeeper/deleted/.del-update.c~670264f51dc44934:
  Delete: isam/update.c
BitKeeper/deleted/.del-write.c~8f1918b1f6770e54:
  Delete: isam/write.c
BitKeeper/deleted/.del-Makefile.am~6cfa0db5e7778d09:
  Delete: isam/Makefile.am
BitKeeper/deleted/.del-make-ccc~3ee55391eda0b0ab:
  Delete: isam/make-ccc
BitKeeper/deleted/.del-ChangeLog~208984fb7a51e568:
  Delete: isam/ChangeLog
BitKeeper/deleted/.del-test_all.res~c2aafb49a3a77db7:
  Delete: isam/test_all.res
BitKeeper/deleted/.del-test_all~93c701e44a9c5b65:
  Delete: isam/test_all
BitKeeper/deleted/.del-.cvsignore~54f6f0f2d5012561:
  Delete: isam/.cvsignore
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
  Delete: sql/ha_isammrg.cc
BitKeeper/deleted/.del-ha_isam.h~bf53d533be3d3927:
  Delete: sql/ha_isam.h
BitKeeper/deleted/.del-ha_isammrg.h~66fd2e5bfe7207dc:
  Delete: sql/ha_isammrg.h
acinclude.m4:
  Remove ISAM
client/mysqldump.c:
  FIELD_TYPE -> MYSQL_TYPE
client/mysqltest.c:
  Add missing DBUG_RETURN
configure.in:
  Remove ISAM
heap/heapdef.h:
  Add support for VARCHAR
heap/hp_create.c:
  Add support for VARCHAR
heap/hp_delete.c:
  Add support for VARCHAR
heap/hp_hash.c:
  Add support for VARCHAR
  (VARCHAR keys was not supported before)
heap/hp_rkey.c:
  Add support for VARCHAR
heap/hp_update.c:
  Add support for VARCHAR
heap/hp_write.c:
  Add support for VARCHAR
  (Added flag SEARCH_UPDATE to mark that this is an update)
include/decimal.h:
  Remove not needed my_global.h
include/m_ctype.h:
  Add support for VARCHAR
include/my_base.h:
  Add support for VARCHAR
include/my_handler.h:
  Moved general purpose macro from MyISAM code
include/mysql_com.h:
  Add support for VARCHAR
libmysql/libmysql.c:
  Add support for VARCHAR
libmysqld/Makefile.am:
  Removed ISAM
myisam/ft_static.c:
  Add support for VARCHAR
myisam/ft_test1.c:
  Add support for VARCHAR
myisam/ft_update.c:
  Add support for VARCHAR
myisam/mi_check.c:
  Add support for VARCHAR
myisam/mi_create.c:
  Add support for VARCHAR
  - VARCHAR key segments are marked with HA_VAR_LENGTH_PART
myisam/mi_key.c:
  Add support for VARCHAR
  Fixed bug in old VARCHAR code when reading index-only
myisam/mi_range.c:
  Fixed comment style
myisam/mi_rnext_same.c:
  Handle case where equal keys can be of different length
myisam/mi_search.c:
  Add support for VARCHAR
myisam/mi_test1.c:
  Add support for VARCHAR
myisam/mi_unique.c:
  Add support for VARCHAR
  (Some new code to handle keys that are equal but have different lengths)
myisam/mi_write.c:
  Fixed comment
myisam/myisamchk.c:
  Better infotext if wrong type
mysql-test/r/bdb.result:
  Updated old result and new results for VARCHAR
mysql-test/r/create.result:
  Updated old result and new results for VARCHAR
mysql-test/r/ctype_tis620.result:
  Updated old result and new results for VARCHAR
  (Old code sorted tis620 wrong)
mysql-test/r/ctype_ucs.result:
  Updated old result and new results for VARCHAR
mysql-test/r/endspace.result:
  Updated old result and new results for VARCHAR
mysql-test/r/func_like.result:
  Updated old result and new results for VARCHAR
mysql-test/r/heap.result:
  Updated old result and new results for VARCHAR
mysql-test/r/innodb.result:
  Updated old result. This will change a bit when also InnoDB supports VARCHAR
mysql-test/r/merge.result:
  Updated old result and new results for VARCHAR
mysql-test/r/myisam.result:
  Updated old result and new results for VARCHAR
mysql-test/r/mysqldump.result:
  Updated old result and new results for VARCHAR
mysql-test/r/order_by.result:
  Updated old result and new results for VARCHAR
  (Key length is different for VARCHAR)
mysql-test/r/ps.result:
  Updated old result and new results for VARCHAR
mysql-test/r/ps_1general.result:
  Updated results for new .frm version
  Don't print seconds in show full process list as this may change
mysql-test/r/ps_2myisam.result:
  Updated old result and new results for VARCHAR
mysql-test/r/ps_3innodb.result:
  Updated old result and new results for VARCHAR
mysql-test/r/ps_4heap.result:
  Updated old result and new results for VARCHAR
mysql-test/r/ps_5merge.result:
  Updated old result and new results for VARCHAR
mysql-test/r/ps_6bdb.result:
  Updated old result and new results for VARCHAR
mysql-test/r/select.result.es:
  Updated results by hand
mysql-test/r/select.result:
  Updated old result and new results for VARCHAR
mysql-test/r/select_found.result:
  Updated old result and new results for VARCHAR
mysql-test/r/show_check.result:
  Updated old result and new results for VARCHAR
mysql-test/r/strict.result:
  Updated old result and new results for VARCHAR
mysql-test/r/subselect.result:
  Updated old result and new results for VARCHAR
mysql-test/r/system_mysql_db.result:
  Updated old result and new results for VARCHAR
mysql-test/r/type_blob.result:
  Updated old result and new results for VARCHAR
mysql-test/r/type_ranges.result:
  Updated old result and new results for VARCHAR
mysql-test/r/type_ranges.result.es:
  Updated some results by hand
mysql-test/t/bdb.test:
  Test VARCHAR
mysql-test/t/ctype_ucs.test:
  Some fixes related to VARCHAR
mysql-test/t/endspace.test:
  Fixes to make it easier to compare columns with end space
mysql-test/t/heap.test:
  Test VARCHAR
mysql-test/t/innodb.test:
  Prepare for testing VARCHAR
mysql-test/t/myisam.test:
  Test VARCHAR
mysql-test/t/ps_1general.test:
  Don't show seconds for show processlist
mysql-test/t/ps_4heap.test:
  Update for VARCHAR
mysql-test/t/strict.test:
  Fix test for VARCHAR
mysql-test/t/type_blob.test:
  Update test for VARCHAR
  Note that now you can't store 'a' and 'a ' in an unique varchar/text index if the column is not binary
mysys/my_handler.c:
  Add support for VARCHAR
ndb/src/common/util/NdbSqlUtil.cpp:
  Fix for usage of strnncollsp
scripts/mysql_fix_privilege_tables.sh:
  Simple fix so that my_print_defaults works
sql/Makefile.am:
  Remove ISAM
sql/field.cc:
  Add support for VARCHAR
  Fixed the keys for blob's are compared with strnncollsp
  Ensure that old tables from MySQL 4.0 works as they did before.
  (Old VARCHAR will be converted to new VARCHAR on ALTER TABLE)
sql/field.h:
  Add support for VARCHAR
sql/field_conv.cc:
  Change FIELD_TYPE_VAR_STRING -> MYSQL_TYPE_VARCHAR
  Added usage of HA_KEY_BLOB_LENGTH
sql/ha_berkeley.cc:
  Add support for VARCHAR
  Added usage of table->insert_or_update if we would ever want to know in key_cmp if we are changing keys
sql/ha_heap.cc:
  Add support for VARCHAR
sql/ha_innodb.cc:
  Changed MYSQL_TYPE_VAR_STRING to MYSQL_TYPE_VARCHAR.
  Waiting for Heikki to add full VARCHAR support
sql/ha_innodb.h:
  InnoDB doesn't support full VARCHAR yet
sql/ha_myisam.cc:
  Add support for VARCHAR
sql/ha_ndbcluster.cc:
  Add support for VARCHAR
sql/handler.h:
  Added HA_NO_VARCHAR for table handler that doesn't support VARCHAR. In this case MySQL will create a normal CHAR instead
sql/item.cc:
  Fixed access of already freed memory
  Added support of VARCHAR
  - varchar length is now checked in mysql_prepare
sql/item_cmpfunc.cc:
  Added new parameter to strncollsp
sql/item_sum.cc:
  Added new parameter to strncollsp
  FIELD_TYPE -> MYSQL_TYPE
sql/key.cc:
  Add support for VARCHAR
sql/opt_range.cc:
  Remove character set parameter from set_key_image()
sql/opt_sum.cc:
  Remove character set parameter from set_key_image()
sql/protocol.cc:
  Return MYSQL_TYPE_VAR_STRING instead of MYSQL_TYPE_VARCHAR to clients (to not cause compatiblity problems)
sql/sql_acl.cc:
  Change key handling code so that we can use CHAR or VARCHAR for the user table columns
sql/sql_base.cc:
  Remove old, not used code
sql/sql_help.cc:
  Remove charset from get_key_image
sql/sql_parse.cc:
  Ensure that OPTION_TABLE_LOCK is cleared ASAP; This fixed a problem in BDB transaction code when one used LOCK TABLES on a BDB table
  Added support for VARCHAR
  Moved field length checking and VARCHAR -> TEXT convert to mysql_prepare (as we need the know the character set for the column)
sql/sql_select.cc:
  Added support of VARCHAR
  Added heuristic to use fixed size rows for tmp tables if we are using only a few short VARCHAR's
sql/sql_string.cc:
  Added extra argument to strnncollsp
sql/sql_table.cc:
  Add support for VARCHAR
  Automaticly convert (with warning) big VARCHAR (but not CHAR) to TEXT
  If handler doesn't support VARCHAR convert VARCHAR to CHAR
sql/sql_update.cc:
  Fixed compiler warning
sql/sql_yacc.yy:
  Add support for VARCHAR
sql/strfunc.cc:
  Fixed valgrind warning
sql/structs.h:
  Added 'table' to KEY structure to make life easier for some handler functions
sql/table.cc:
  Add support for VARCHAR
  - New .frm version
  - FIELD_TYPE -> MYSQL_TYPE
sql/table.h:
  Added insert_or_update; A bool flag a handler can set/reset if needed (for handler internal usage)
sql/unireg.h:
  Add support for VARCHAR
strings/ctype-big5.c:
  Added new argument to strnncollsp() to allow one to define if end space are significant or not
  Changed my_like_range... to correctly calculate min_length & max_length
strings/ctype-bin.c:
  Added new argument to strnncollsp() to allow one to define if end space are significant or not
strings/ctype-czech.c:
  Changed my_like_range... to correctly calculate min_length & max_length
strings/ctype-gbk.c:
  Added new argument to strnncollsp() to allow one to define if end space are significant or not
  Changed my_like_range... to correctly calculate min_length & max_length
strings/ctype-latin1.c:
  Added new argument to strnncollsp() to allow one to define if end space are significant or not
strings/ctype-mb.c:
  Added new argument to strnncollsp() to allow one to define if end space are significant or not
  Changed my_like_range... to correctly calculate min_length & max_length
strings/ctype-simple.c:
  Added new argument to strnncollsp() to allow one to define if end space are significant or not
  Changed my_like_range... to correctly calculate min_length & max_length
strings/ctype-sjis.c:
  Added new argument to strnncollsp() to allow one to define if end space are significant or not
  Changed my_like_range... to correctly calculate min_length & max_length
strings/ctype-tis620.c:
  Added new argument to strnncollsp() to allow one to define if end space are significant or not
  Changed my_like_range... to correctly calculate min_length & max_length
strings/ctype-uca.c:
  Added new argument to strnncollsp() to allow one to define if end space are significant or not
strings/ctype-ucs2.c:
  Changed my_like_range... to correctly calculate min_length & max_length
strings/ctype-utf8.c:
  Added new argument to strnncollsp() to allow one to define if end space are significant or not
strings/ctype-win1250ch.c:
  Changed my_like_range... to correctly calculate min_length & max_length
strings/decimal.c:
  Fixed include files usage
  Fixed some compiler warnings
tests/client_test.c:
  Ensure tests works with VARCHAR
2004-12-06 02:00:37 +02:00
unknown
a352372170 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-join-5.0


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
2004-11-25 02:27:02 +02:00
unknown
239cdc27dc Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-error-5.0


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/table.h:
  Auto merged
2004-11-24 20:01:34 +02:00
unknown
c774eb0e6d fixed problem in MacOS
correct printing of aliases


mysql-test/r/lowercase_view.result:
  aliases in VIEWs
mysql-test/t/lowercase_view.test:
  aliases in VIEWs
sql/item.cc:
  tracking using aliases in indentifiers
sql/item.h:
  tracking using aliases in indentifiers
sql/sql_base.cc:
  tracking using aliases in indentifiers
sql/sql_lex.cc:
  tracking using aliases in indentifiers
sql/sql_lex.h:
  tracking using aliases in indentifiers
sql/table.h:
  tracking using aliases in indentifiers
2004-11-24 19:48:30 +02:00
unknown
3392e3178a Fixed bug related to lower case table names on Power Mac
'information_schema' test is splitted because of innodb  


mysql-test/r/information_schema.result:
  Test is splitted because of innodb
mysql-test/t/information_schema.test:
  Test is splitted because of innodb
sql/sql_show.cc:
  Fixed bug related to lower case table names on Power Mac
sql/table.h:
  Fixed bug related to lower case table names on Power Mac
tests/client_test.c:
  Don't check field length for blob filed
2004-11-24 19:32:10 +03:00
unknown
35502d45e0 sql/ha_innodb.cc
enabled query cache for ndb
    modified engine interface somewhat
sql/ha_innodb.h
    enabled query cache for ndb
    modified engine interface somewhat
sql/ha_ndbcluster.cc
    enabled query cache for ndb
    modified engine interface somewhat
    ndb will only allow caching and retrieval if running autocommit
      - return false, but do not invalidate
    commit count is used as engine data, i.e.
      - store commit count before store of cache
      - allow retrieval if commit count has not changed on a table
      - invalidate if commit count has changed
sql/ha_ndbcluster.h
    enabled query cache for ndb
    modified engine interface somewhat
sql/handler.cc
    enabled query cache for ndb
    modified engine interface somewhat
sql/handler.h
    enabled query cache for ndb
    modified engine interface somewhat
    new virtual handler method cached_table_registration called on each table before alowing store in query cache
      - return TRUE - ok to cache, FALSE - not allowed to cache, invalidate queries if engine_data below has changed
      - sets ulonglong (engine_data) that is stored in query cache for each table
      - sets callback to be called for each table before usage of cached query, callback = 0 -> no check later
sql/mysql_priv.h
    enabled query cache for ndb
    modified engine interface somewhat
    callcack prototype for callback to engine before query cache retrieval
sql/sql_cache.cc
    enabled query cache for ndb
    modified engine interface somewhat
    if callback is set on table in cache, do callback to check if allowed to use cache
    if not allowed to use cache, check if engine_data has changed, if so, invalidate all queries with that table
    + changes to store and pass callback and engine_data around
sql/sql_cache.h
    enabled query cache for ndb
    modified engine interface somewhat
    changes to store callback and engine_data
sql/table.h
    enabled query cache for ndb
    modified engine interface somewhat
    changes to store callback and engine_data


sql/ha_innodb.cc:
  enabled query cache for ndb
  modified engine interface somewhat
sql/ha_innodb.h:
  enabled query cache for ndb
  modified engine interface somewhat
sql/ha_ndbcluster.cc:
  enabled query cache for ndb
  modified engine interface somewhat
  ndb will only allow caching and retrieval if running autocommit
    - return false, but do not invalidate
  commit count is used as engine data, i.e.
    - store commit count before store of cache
    - allow retrieval if commit count has not changed on a table
    - invalidate if commit count has changed
sql/ha_ndbcluster.h:
  enabled query cache for ndb
  modified engine interface somewhat
sql/handler.cc:
  enabled query cache for ndb
  modified engine interface somewhat
sql/handler.h:
  enabled query cache for ndb
  modified engine interface somewhat
  new virtual handler method cached_table_registration called on each table before alowing store in query cache
    - return TRUE - ok to cache, FALSE - not allowed to cache, invalidate queries if engine_data below has changed
    - sets ulonglong (engine_data) that is stored in query cache for each table
    - sets callback to be called for each table before usage of cached query, callback = 0 -> no check later
sql/mysql_priv.h:
  enabled query cache for ndb
  modified engine interface somewhat
  callcack prototype for callback to engine before query cache retrieval
sql/sql_cache.cc:
  enabled query cache for ndb
  modified engine interface somewhat
  if callback is set on table in cache, do callback to check if allowed to use cache
  if not allowed to use cache, check if engine_data has changed, if so, invalidate all queries with that table
  + changes to store and pass callback and engine_data around
sql/sql_cache.h:
  enabled query cache for ndb
  modified engine interface somewhat
  changes to store callback and engine_data
sql/table.h:
  enabled query cache for ndb
  modified engine interface somewhat
  changes to store callback and engine_data
2004-11-24 11:56:51 +00:00
unknown
3afa86dc34 More test cases are added
Fixed bug 'using of alias with information schema tables in views'
removed compiler warnings


mysql-test/r/information_schema.result:
  More test cases are added
mysql-test/t/information_schema.test:
  More test cases are added
sql/sql_select.cc:
  Fixed bug 'using of alias with information schema tables in views'
sql/sql_show.cc:
  Fixed bug 'using of alias with information schema tables in views'
  Changed length of some columns
sql/table.h:
  Fixed bug 'using of alias with information schema tables in views'
tests/client_test.c:
  Changed length of some columns
2004-11-23 17:41:39 +03:00
unknown
5a00a868b7 merge
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2004-11-21 20:08:12 +02:00
unknown
cd2edd1713 remove unused parts of code
fix for 'show create schema_table'
fix for usage schema tables in subselect
'wrong schema table charset' fix


mysql-test/r/information_schema.result:
  'wrong schema table charset' fix
mysql-test/t/information_schema.test:
  'wrong schema table charset' fix
sql/mysql_priv.h:
  fix for 'show create schema_table'
sql/sql_class.cc:
  'wrong schema table charset' fix
sql/sql_class.h:
  'wrong schema table charset' fix
sql/sql_parse.cc:
  fix for 'show create schema_table'
sql/sql_select.cc:
  'wrong schema table charset' fix
sql/sql_show.cc:
  remove unused parts of code
  fix for 'show create schema_table'
  fix for usage schema tables in subselect
sql/table.h:
  remove unused parts of coed
tests/client_test.c:
  'wrong schema table charset' fix
2004-11-18 12:16:06 +03:00
unknown
7cd9cc1bfc Fix warnings and compilation failures (Windows).
sql/field.cc:
  Fix warning.
sql/item_func.cc:
  Fix Windows compilation failure.
sql/opt_range.cc:
  Fix warnings and errors (Windows)
sql/sp_pcontext.h:
  Fix warning (Windows).
sql/table.h:
  Fix warning (Windows).
2004-11-17 13:45:05 +03:00
unknown
d18a91a90c posmerge fixes
mysql-test/r/view.result:
  erorr reported
sql/item.cc:
  removed starnge code
sql/mysql_priv.h:
  now error represented by Bool value
sql/sql_parse.cc:
  removed old send_error calls
sql/sql_select.cc:
  removed starnge code
sql/sql_show.cc:
  show functions fixed
sql/table.h:
  now error represented by Bool value
2004-11-13 23:26:15 +02:00
unknown
7281d2e3ae WL#1629: SHOW with WHERE(partially) &
WL#173:  Create Data Dictionary Tables for SHOW Commands
2004-11-13 13:56:39 +03:00
unknown
3bc1fcd409 merge
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2004-11-11 21:18:10 +02:00
unknown
adb6dcb928 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-view-5.0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.h:
  Auto merged
2004-11-08 03:33:52 +02:00
unknown
f1b9bf699e postreview fixes
mysql-test/r/multi_update.result:
  test with multiupdate reopening tables
mysql-test/t/multi_update.test:
  test with multiupdate reopening tables
sql/item.cc:
  processor for cleunuping items in item tree
sql/item.h:
  processor for cleunuping items in item tree
sql/sql_update.cc:
  fixed case when lock reopened tables
sql/table.cc:
  methos for cleunup view itema of table if they are present
sql/table.h:
  methos for cleunup view itema of table if they are present
2004-11-08 01:54:23 +02:00
unknown
79a33fa20c Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-view-5.0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
2004-11-06 12:46:46 +02:00
unknown
8b0ece5e88 new lock for multiupdate:
- open and create derived tables
- detect which tables should be locked for write
- lock and fill derived tables
some unitialized variables fixed


mysql-test/r/lock_multi.result:
  correct results returned
mysql-test/r/multi_update.result:
  correct results returned
mysql-test/r/view.result:
  correct results returned
mysql-test/t/multi_update.test:
  correct results returned
mysql-test/t/view.test:
  correct results returned
sql/mysql_priv.h:
  derived tables processing splited on table creation and table filling
sql/sql_base.cc:
  derived tables processing splited on table creation and table filling
sql/sql_class.h:
  function to detect when we need fill derived tables
sql/sql_derived.cc:
  derived tables processing splited on table creation and table filling
sql/sql_lex.cc:
  fixed uninitialized value
sql/sql_load.cc:
  fixed uninitialized value
sql/sql_parse.cc:
  initialization muved (will be done for all queries)
sql/sql_prepare.cc:
  preparation of multiupdate changed a bit because new locking procedure
sql/sql_update.cc:
  new lock for multiupdate:
  - open and create derived tables
  - detect which tables should be locked for write
  - lock and fill derived tables
sql/table.h:
  place to store select_result between creation and filling tables
2004-11-05 17:29:47 +02:00
unknown
f095274fe8 merge with 4.1
BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
BitKeeper/triggers/post-commit:
  Auto merged
Docs/Support/texi2html:
  Auto merged
Makefile.am:
  Auto merged
client/Makefile.am:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
include/my_base.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
include/my_sys.h:
  Auto merged
include/my_time.h:
  Auto merged
include/mysql.h:
  Auto merged
include/mysql_com.h:
  Auto merged
innobase/buf/buf0buf.c:
  Auto merged
innobase/include/row0mysql.h:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/examples/Makefile.am:
  Auto merged
myisam/mi_check.c:
  Auto merged
mysql-test/include/ps_modify.inc:
  Auto merged
mysql-test/install_test_db.sh:
  Auto merged
mysql-test/r/alter_table.result:
  Auto merged
mysql-test/r/auto_increment.result:
  Auto merged
mysql-test/r/bdb.result:
  Auto merged
mysql-test/r/ctype_latin1_de.result:
  Auto merged
mysql-test/r/ctype_recoding.result:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_if.result:
  Auto merged
mysql-test/t/derived.test:
  Auto merged
mysql-test/t/insert.test:
  merge with 4.1
  Fixed test case to not use 'if exists' when it shouldn't
mysql-test/t/range.test:
  merge with 4.1
  Added missing drop table
sql/ha_ndbcluster.cc:
  merge with 4.1
  Simple optimization: use max() instead of ? :
sql/item_func.cc:
  merge with 4.1
  (Added back old variable names for easier merges)
sql/opt_range.cc:
  merge with 4.1
  Removed argument 'parent_alloc' from QUICK_RANGE_SELECT as this was not used
  Added assert if using QUICK_GROUP_MIN_MAX_SELECT with parent_alloc as the init() function can't handle this
  Changed back get_quick_select_for_ref() to use it's own alloc root becasue this function may be called several times for one query
sql/sql_handler.cc:
  merge with 4.1
  change variable 'err' to 'error' as same function had a label named 'err'
sql/sql_update.cc:
  Use multi-update code from 5.0 instead of 4.1
  We will fix the locking code shortly in 5.0 to be faster than in 4.1
2004-10-29 19:26:52 +03:00
unknown
9f9893c971 fixed detection of updating table on which we select (BUG#6032)
mysql-test/r/view.result:
  Trys update table from which we select using views and subqueries
mysql-test/t/view.test:
  Trys update table from which we select using views and subqueries
sql/sql_acl.cc:
  fix of fix for bug BUG#5976
sql/sql_base.cc:
  protection against temporary tables which have not table->table->table_cache_key
  fixed unique check to skip the same table instences
sql/sql_delete.cc:
  removed next_independent to allow to check VIEW subqueries
sql/sql_insert.cc:
  removed next_independent to allow to check VIEW subqueries
sql/sql_parse.cc:
  removed next_independent to allow to check VIEW subqueries
sql/sql_update.cc:
  removed next_independent to allow to check VIEW subqueries
sql/sql_view.cc:
  removed next_independent to allow to check VIEW subqueries
  optimisation to mark as non-updatable views with subqueries by same table.
sql/table.h:
  removed next_independent to allow to check VIEW subqueries
2004-10-25 17:32:28 +03:00
unknown
4512a46e65 A fix and test case for Bug#6050 "EXECUTE stmt reports ambiguous field
names with ident. tables fr. diff. schemata": revise all uses of
Item_field and make them prepared-statements friendly when necessary.


mysql-test/r/ps.result:
  Test results fixed: the test case for Bug#6050
mysql-test/r/ps_1general.result:
  Test results fixed: in prepared statements we expand '*' to a list
  of fully qualified fields (db.table.column).
mysql-test/t/ps.test:
  A test for Bug#6050 "EXECUTE stmt reports ambiguous fieldnames with 
  ident. tables fr. diff. schemata"
sql/item.cc:
  Revise all Item_field constructors: we need to make sure that no Item_field
  object points to unaccessible memory in prepared statements.
sql/item.h:
  Revise all Item_field constructors: we need to make sure that no Item_field
  object points to unaccessible memory in prepared statements.
sql/sql_base.cc:
  Item_field use changed to be prepared statements friendly.
sql/sql_class.h:
  New check of Item_arena state.
sql/sql_union.cc:
  Fixing the problem with name resolving in UNION and prepared statements:
  In case of SELECT a, b, c FROM t1 UNION SELECT a, b, c FROM t2 the list of
  selected items is represented as a List<Item_field>, where each 
  Item_field points to a field of temporary table.
  But the temporary table is created anew on each execution of the prepared 
  statement. So on each subsequent execution we should reset Item_field
  items to point to fields from freshly-created temporary table.
sql/table.h:
  Comment TABLE member.
2004-10-22 14:47:35 +04:00
unknown
58aa05e23e Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-view-5.0


sql/item_strfunc.h:
  Auto merged
sql/table.h:
  Auto merged
2004-10-22 09:53:08 +03:00
unknown
149fda59dd new behaviour of CHECK option build, for mor efficience and more correct:
check option build only according most top VIEW  CHECK OPTION TYPE  (BUG#5993)


mysql-test/r/view.result:
  CASCADED should be used for all underlaying VIEWs
mysql-test/t/view.test:
  CASCADED should be used for all underlaying VIEWs
sql/sql_base.cc:
  new behaviour of CHECK option build, for mor efficience and more correct.
sql/table.cc:
  new behaviour of CHECK option build, for mor efficience and more correct.
sql/table.h:
  new behaviour of CHECK option build, for mor efficience and more correct.
2004-10-21 18:10:59 +03:00
unknown
05933f13f7 table.h, sql_select.h:
Added the code processing on expressions for applying
  multiple equalities.
sql_select.cc:
  Post-merge fixes for Item_equal patch.
  Added the code processing on expressions for applying
  multiple equalities.
Many files:
  Post-merge fixes for Item_equal patch.
item_cmpfunc.cc:
  Post-merge fixes for Item_equal patch.
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
item.h, item.cc:
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.


mysql-test/r/func_test.result:
  Post-merge fixes for Item_equal patch.
mysql-test/r/index_merge.result:
  Post-merge fixes for Item_equal patch.
mysql-test/r/join_nested.result:
  Post-merge fixes for Item_equal patch.
mysql-test/r/range.result:
  Post-merge fixes for Item_equal patch.
sql/item.cc:
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
sql/item.h:
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
sql/item_cmpfunc.cc:
  Post-merge fixes for Item_equal patch.
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
sql/opt_range.cc:
  Post-merge fixes for Item_equal patch.
sql/sql_select.cc:
  Post-merge fixes for Item_equal patch.
  Added the code processing on expressions for applying
  multiple equalities.
sql/sql_select.h:
  Added the code processing on expressions for applying
  multiple equalities.
sql/table.h:
  Added the code processing on expressions for applying
  multiple equalities.
2004-10-19 14:12:55 -07:00
unknown
72ed0fc022 test of DELETE privilege and cyclic reference added in case of altering view (BUG#5148)
fixed ALTER VIEW syntax
fixed WITH CHECK OPTION clause printing in SHOW CREATE VIEW


mysql-test/r/view.result:
  test of VIEW altering
mysql-test/t/view.test:
  test of VIEW altering
sql/lex.h:
  explicitly mentioned undefined algorithm
sql/sql_show.cc:
  explicitly mentioned undefined algorithm
  added printing WITH CHECK OPTION clause
sql/sql_view.cc:
  test of DELETE privilege and cyclic reference added in case of altering view
  effective and requested WITH CHECK OPTION parameters divided
sql/sql_yacc.yy:
  fixed ALTER VIEW
sql/table.cc:
  effective and requested WITH CHECK OPTION parameters divided
sql/table.h:
  effective and requested WITH CHECK OPTION parameters divided
2004-10-07 15:43:04 +03:00
unknown
5b82bc6644 merge
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
2004-10-07 11:36:46 +03:00
unknown
640fefffa7 fixed & added comments (according to Igor's review and a bit more)
sql/item_strfunc.h:
  spelling fixed
sql/parse_file.cc:
  spelling fixed
sql/parse_file.h:
  spelling fixed
sql/password.c:
  spelling fixed
sql/sql_acl.cc:
  spelling fixed
sql/sql_lex.cc:
  comments added and fixed
sql/sql_parse.cc:
  spelling fixed
sql/sql_show.cc:
  spelling fixed
sql/sql_update.cc:
  comments fixed
sql/sql_view.cc:
  comments added
  spelling and comments fixed
  // comments changed with /* */ ones
sql/sql_yacc.yy:
  comments fixed
sql/table.cc:
  spelling fixed
  comments added and fixed
sql/table.h:
  spelling fixed
  comments fixed
2004-10-07 01:45:06 +03:00
unknown
bbab9ec678 Merge with 4.0 for 4.1 release
Noteworthy:
- New HANDLER code
- New multi-update-grant-check code
- Table lock code in ha_innodb.cc was not applied


BitKeeper/etc/logging_ok:
  auto-union
BitKeeper/deleted/.del-ctype-latin1_de.c~c5d8f9208bceb98e:
  Auto merged
Build-tools/mysql-copyright-2:
  Auto merged
acinclude.m4:
  Auto merged
client/mysqladmin.c:
  Auto merged
client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
include/my_global.h:
  Auto merged
include/myisam.h:
  Auto merged
innobase/btr/btr0btr.c:
  Auto merged
innobase/buf/buf0buf.c:
  Auto merged
ltmain.sh:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/fsp/fsp0fsp.c:
  Auto merged
innobase/include/dict0dict.h:
  Auto merged
innobase/include/row0mysql.h:
  Auto merged
innobase/log/log0log.c:
  Auto merged
innobase/log/log0recv.c:
  Auto merged
innobase/pars/pars0opt.c:
  Auto merged
innobase/row/row0row.c:
  Auto merged
innobase/sync/sync0arr.c:
  Auto merged
innobase/ut/ut0dbg.c:
  Auto merged
myisam/mi_check.c:
  Auto merged
myisam/mi_close.c:
  Auto merged
myisam/mi_create.c:
  Auto merged
myisam/mi_locking.c:
  Auto merged
myisam/myisampack.c:
  Auto merged
mysql-test/r/delete.result:
  Auto merged
mysql-test/r/func_if.result:
  Auto merged
Build-tools/mysql-copyright:
  Merge with 4.0 (too most of the code from 4.0)
Makefile.am:
  merge
client/mysql.cc:
  Used 4.1 code
configure.in:
  merge
innobase/os/os0file.c:
  merge
innobase/row/row0mysql.c:
  merge
mysql-test/r/ctype_latin1_de.result:
  merge
mysql-test/r/flush_table.result:
  merge
mysql-test/r/func_str.result:
  merge
mysql-test/r/handler.result:
  merge
mysql-test/r/multi_update.result:
  merge
mysql-test/r/type_timestamp.result:
  Removed testing of 'new' mode, as this is only relevant for 4.0
mysql-test/r/update.result:
  merge
mysql-test/t/delete.test:
  merge
mysql-test/t/flush_table.test:
  merge
mysql-test/t/func_str.test:
  merge
mysql-test/t/handler.test:
  merge
mysql-test/t/multi_update.test:
  merge
mysql-test/t/type_timestamp.test:
  Removed testing of 'new' mode, as this is only relevant for 4.0
mysql-test/t/update.test:
  merge
mysys/errors.c:
  merge
mysys/my_fstream.c:
  merge
mysys/my_pread.c:
  merge
mysys/my_write.c:
  merge
mysys/mysys_priv.h:
  merge
scripts/mysqlhotcopy.sh:
  merge
sql/field.cc:
  Keep code from 4.1
sql/field.h:
  Keep code from 4.1
sql/ha_innodb.cc:
  Don't merge lock code from 4.0; Heikki will look at this
sql/ha_myisam.cc:
  merge
sql/handler.cc:
  merge
sql/item_cmpfunc.cc:
  merge
sql/item_cmpfunc.h:
  merge
sql/item_strfunc.cc:
  merge
sql/mysql_priv.h:
  merge
sql/mysqld.cc:
  merge
sql/protocol.cc:
  merge
sql/records.cc:
  merge
sql/repl_failsafe.cc:
  merge
mysql-test/r/lock_multi.result:
  merge
mysql-test/t/ctype_latin1_de.test:
  merge
mysql-test/t/func_if.test:
  merge
mysql-test/t/lock_multi.test:
  merge
sql/repl_failsafe.h:
  merge
  Remove unnessessary header protection
sql/slave.h:
  merge
sql/sql_acl.cc:
  merge
sql/sql_base.cc:
  merge
sql/sql_cache.cc:
  auto merge
sql/sql_class.cc:
  merge
sql/sql_class.h:
  merge
sql/sql_delete.cc:
  merge
sql/sql_handler.cc:
  Get new HANDLER code into 4.1
sql/sql_parse.cc:
  Keep old file
sql/sql_repl.cc:
  merge
sql/sql_repl.h:
  merge
sql/sql_show.cc:
  merge
sql/sql_table.cc:
  merge
sql/sql_union.cc:
  Applied the examine_rows bug fix from 4.0 by hand
sql/sql_update.cc:
  New multi-update-grant-check code from 4.0
sql/sql_yacc.yy:
  New multi-update-grant-check code from 4.0
sql/stacktrace.c:
  merge
sql/table.h:
  merge
2004-10-06 19:14:33 +03:00
unknown
75730fb37e merge
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
2004-10-05 13:41:51 +03:00
unknown
7b51154461 Support for TIMESTAMP columns holding NULL values. Unlike all other
column types TIMESTAMP is NOT NULL by default, so in order to have 
TIMESTAMP column holding NULL valaues you have to specify NULL as
one of its attributes (this needed for backward compatibility).

Main changes:
Replaced TABLE::timestamp_default_now/on_update_now members with
TABLE::timestamp_auto_set_type flag which is used everywhere
for determining if we should auto-set value of TIMESTAMP field 
during this operation or not. We are also use Field_timestamp::set_time()
instead of handler::update_timestamp() in handlers.


mysql-test/r/type_timestamp.result:
  Added test for TIMESTAMP columns which are able to store NULL values.
mysql-test/t/type_timestamp.test:
  Added test for TIMESTAMP columns which are able to store NULL values.
sql/field.cc:
  Added support for TIMESTAMP fields holding NULL values.
  We don't need Field_timestamp::set_timestamp_offsets() anymore.
  Instead we need Field_timestamp::get_auto_set_type() function
  which will convert TIMESTAMP auto-set type stored in Field in 
  unireg_check to value from timestamp_auto_set_type_enum.
  (We can't replace this function with additional Field_timestamp member
  and some code in constructor because then we will have troubles
  with Field::new_field() method).
  We should also set field to not null in Field_timestamp::set_time() now.
sql/field.h:
  Added support for TIMESTAMP fields holding NULL values.
  We don't need Field_timestamp::set_timestamp_offsets() anymore.
  Instead we need Field_timestamp::get_auto_set_type() function,
  which will convert TIMESTAMP auto-set type stored in Field in 
  unireg_check to value from timestamp_auto_set_type_enum.
  We also have to support NULL values in Field_timestamp::get_timestamp()
  function.
sql/field_conv.cc:
  Added comment clarifying behavior in case of TIMESTAMP fields which are
  able to store NULL values.
sql/ha_berkeley.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_heap.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_innodb.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_isam.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_isammrg.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_myisam.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_myisammrg.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_ndbcluster.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/handler.cc:
  handler::update_timestamp() is no longer needed since now we use
  Field_timestamp::set_time() instead.
  (we can't use handler::update_timestamp() anyway since field position
  only is not enough for TIMESTAMP fields which are able to store NULLs)
sql/handler.h:
  handler::update_timestamp() is no longer needed since now we use
  Field_timestamp::set_time() instead.
sql/item_timefunc.cc:
  Since now TIMESTAMP fields can hold NULL values we should take this into
  account.
sql/sql_base.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now. 
  (Here we use Field_timestamp::get_auto_set_type() to setup its value
   before further statement execution).
sql/sql_insert.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now.
sql/sql_load.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now.
sql/sql_parse.cc:
  Added support for TIMESTAMP fields holding NULL values.
  We should distinguish NULL default values and non-specified default
  values for such fields (because latter could mean DEFAULT NOW()
  ON UPDATE NOW() in some cases).
sql/sql_show.cc:
  Added support for TIMESTAMP fields holding NULL values.
  Unlike all other fields these are NOT NULL by default
  so we have to specify NULL attribute explicitly for them.
sql/sql_table.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now.
sql/sql_update.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now.
sql/sql_yacc.yy:
  Added support for TIMESTAMP fields holding NULL values.
  Unlike all other fields these are NOT NULL by default
  (so we have to set NOT_NULL_FLAG properly for them).
sql/table.h:
  Added timestamp_auto_set_type enum which values are used for indicating
  during which operations we should automatically set TIMESTAPM field
  value to current timestamp.
  TABLE: Replaced timestamp_default_now/on_update_now members with
  timestamp_auto_set_type flag (Now when TIMESTAMP field are able to 
  store NULL values, single position of field in record is not enough 
  for updating this field anyway).
2004-10-01 18:54:06 +04:00
unknown
40ac8462d5 merge
sql/sql_class.h:
  Auto merged
sql/sql_lex.h:
  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
2004-09-29 17:10:17 +03:00
unknown
e05e18606b post review changes:
CHECK OPTION moved to one function
view name added to error messages


mysql-test/r/view.result:
  error messages changed
sql/share/czech/errmsg.txt:
  view name added
sql/share/danish/errmsg.txt:
  view name added
sql/share/dutch/errmsg.txt:
  view name added
sql/share/english/errmsg.txt:
  view name added
sql/share/estonian/errmsg.txt:
  view name added
sql/share/french/errmsg.txt:
  view name added
sql/share/german/errmsg.txt:
  view name added
sql/share/greek/errmsg.txt:
  view name added
sql/share/hungarian/errmsg.txt:
  view name added
sql/share/italian/errmsg.txt:
  view name added
sql/share/japanese/errmsg.txt:
  view name added
sql/share/korean/errmsg.txt:
  view name added
sql/share/norwegian-ny/errmsg.txt:
  view name added
sql/share/norwegian/errmsg.txt:
  view name added
sql/share/polish/errmsg.txt:
  view name added
sql/share/portuguese/errmsg.txt:
  view name added
sql/share/romanian/errmsg.txt:
  view name added
sql/share/russian/errmsg.txt:
  view name added
sql/share/serbian/errmsg.txt:
  view name added
sql/share/slovak/errmsg.txt:
  view name added
sql/share/spanish/errmsg.txt:
  view name added
sql/share/swedish/errmsg.txt:
  view name added
sql/share/ukrainian/errmsg.txt:
  view name added
sql/sql_class.h:
  view reference saved
sql/sql_insert.cc:
  CHECK OPTION moved to one function
sql/sql_update.cc:
  CHECK OPTION moved to one function
sql/sql_view.cc:
  view name added to error message
sql/table.cc:
  CHECK OPTION moved to one function
sql/table.h:
  CHECK OPTION moved to one function
2004-09-29 16:35:01 +03:00
unknown
e6f924efe5 Fix for bug #4131 "TIMESTAMP columns missing minutes and seconds when
using GROUP BY"
Now we are setting Field_timestamp::field_length to 19 in open_table()
if we are in new mode (and we are restoring it back when we are coming
back to normal mode). This also should solve potential problems with
some of LOAD DATA INFILE and SELECT * INTO in this mode.


mysql-test/r/type_timestamp.result:
  Added test for bug #4131 'TIMESTAMP columns missing minutes and seconds
  when using GROUP BY' and other --new mode related behavior.
mysql-test/t/type_timestamp.test:
  Added test for bug #4131 'TIMESTAMP columns missing minutes and seconds
  when using GROUP BY' and other --new mode related behavior.
sql/field.cc:
  Added Field_timestamp::orig_field_length member for saving original
  field_length value, because this member can be modified if new_mode is
  in effect.
  Lot of Field_timestamp code simplified and Field_timestamp::make_field()
  is no longer needed because we are setting field_length to 19 if we are
  in --new mode now.
sql/field.h:
  Added Field_timestamp::orig_field_length member for saving original
  field_length value, because this member can be modified if new_mode
  is in effect. 
  Field_timestamp::make_field() is no longer needed because we are setting
  field_length to 19 if we are in --new mode now.
sql/sql_base.cc:
  If --new mode is in effect all TIMESTAMP fields should pretend that they
  have length of 19. We are achieving this by setting 
  Field_timestamp::field_length to 19 (or original value) in open_table().
  We are using TABLE::timestamp_mode variable for avoiding of unnecessary
  looping over all fields of the table and setting field_length if table
  was used with same new_mode value before.
  
  Note: We do not introduce general framework for setting up Field objects
  for usage with current THD here because this fix is only needed in 4.0
  and Monty said that we will also remove looping over all fields when
  updating table_name member at some point. This more general framework
  will also complicate nice optimization with avoiding of unneeded looping.
sql/sql_parse.cc:
  Now when we are creating TIMESTAMP(19) fields by default in --new mode,
  otherwise we will have unaligned behavior between ALTER and CREATE.
sql/table.h:
  Added TABLE::timestamp_mode field for saving information whenever we set 
  field_length members of table's TIMESTAMP fields to 19 (to honor 
  new_mode) or they have original values.
2004-09-27 00:50:00 +04:00
unknown
9aa459f0df support of join view updateability (WL#1809)
include/mysqld_error.h:
  new error mesaages
mysql-test/r/view.result:
  tests of updatint/inserting join views
mysql-test/t/view.test:
  tests of updatint/inserting join views
sql/mysql_priv.h:
  support of "usual UPDATE" -> "multi UPDATE" conversion
sql/share/czech/errmsg.txt:
  new error mesaages
sql/share/danish/errmsg.txt:
  new error mesaages
sql/share/dutch/errmsg.txt:
  new error mesaages
sql/share/english/errmsg.txt:
  new error mesaages
sql/share/estonian/errmsg.txt:
  new error mesaages
sql/share/french/errmsg.txt:
  new error mesaages
sql/share/german/errmsg.txt:
  new error mesaages
sql/share/greek/errmsg.txt:
  new error mesaages
sql/share/hungarian/errmsg.txt:
  new error mesaages
sql/share/italian/errmsg.txt:
  new error mesaages
sql/share/japanese/errmsg.txt:
  new error mesaages
sql/share/korean/errmsg.txt:
  new error mesaages
sql/share/norwegian-ny/errmsg.txt:
  new error mesaages
sql/share/norwegian/errmsg.txt:
  new error mesaages
sql/share/polish/errmsg.txt:
  new error mesaages
sql/share/portuguese/errmsg.txt:
  new error mesaages
sql/share/romanian/errmsg.txt:
  new error mesaages
sql/share/russian/errmsg.txt:
  new error mesaages
sql/share/serbian/errmsg.txt:
  new error mesaages
sql/share/slovak/errmsg.txt:
  new error mesaages
sql/share/spanish/errmsg.txt:
  new error mesaages
sql/share/swedish/errmsg.txt:
  new error mesaages
sql/share/ukrainian/errmsg.txt:
  new error mesaages
sql/sql_base.cc:
  test to avoid join virew to be catched here
sql/sql_class.h:
  support of join views add to update
sql/sql_delete.cc:
  support of join views add to delete(error issue)
sql/sql_insert.cc:
  support of join views add to insert
  (order of some check changed, to allow find table which will be inserted in, when we will know which fields will be inserted)
  mechanism of calling setup_tables() only once fixed for INSERT SELECT
sql/sql_parse.cc:
  support of "usual UPDATE" -> "multi UPDATE" conversion
  mysql_insert_select_prepare now called in same environment for usual queries and PS preparing
  support of join views add to delete (error issue)
sql/sql_prepare.cc:
  support of "usual UPDATE" -> "multi UPDATE" conversion
  support of join views add to delete (error issue)
sql/sql_update.cc:
  support of join views add to update
sql/sql_view.cc:
  join views made updatable
sql/sql_view.h:
  insert_view_fields now can check some errors
sql/table.cc:
  methods to support recursive walk by tables tree
sql/table.h:
  methods to support recursive walk by tables tree
2004-09-15 23:42:56 +03:00
unknown
55a8c28c27 fixed merged view fields names (BUG#5147)
support of merged VIEW over several tables added (WL#1809)


mysql-test/r/view.result:
  merge of VIEW with several tables
mysql-test/t/view.test:
  merge of VIEW with several tables
sql/item.cc:
  renaming Item and restoring item name on cleunup()
sql/item.h:
  renaming Item and restoring item name on cleunup()
  debug output added
sql/item_cmpfunc.h:
  setup_conds() changed to support two tables lists
sql/item_subselect.cc:
  list of table leaves used instead of local table list for name resolving
sql/mysql_priv.h:
  setup_conds() and setup_tables() changed to support two tables lists
sql/opt_sum.cc:
  list of table leaves used instead of local table list for name resolving
sql/sp.cc:
  setup_tables() changed to support two tables lists
sql/sql_base.cc:
  skip temporary tables in table finding
  fixed merged view fields names (BUG#5147)
sql/sql_delete.cc:
  setup_conds() and setup_tables() changed to support two tables lists
sql/sql_help.cc:
  setup_tables() changed to support two tables lists
sql/sql_insert.cc:
  setup_tables() changed to support two tables lists
  name handling support
sql/sql_lex.cc:
  allow view with several tables for MERGE
sql/sql_lex.h:
  new table list
sql/sql_load.cc:
  setup_tables() changed to support two tables lists
sql/sql_olap.cc:
  setup_tables() changed to support two tables lists
sql/sql_parse.cc:
  new list support
sql/sql_prepare.cc:
  new list support
sql/sql_select.cc:
  list of table leaves used instead of local table list for name resolving
sql/sql_update.cc:
  setup_conds() and setup_tables() changed to support two tables lists
sql/sql_view.cc:
  support of MERGED VIEWS with several tables
sql/sql_yacc.yy:
  removed blanks in new code
sql/table.cc:
  fixed setup view code
  support of merged VIEW over several tables added
sql/table.h:
  fixed merged view fields names (BUG#5147)
2004-09-14 19:28:29 +03:00
unknown
f3d4db99c3 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-show-5.0


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  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_update.cc:
  Auto merged
sql/table.h:
  Auto merged
2004-09-10 02:26:09 +03:00
unknown
cab6f8df6d Merge of changes from the main tree to tree for WL#1218 "Triggers".
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/lex.h:
  Auto merged
sql/parse_file.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  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_parse.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
include/mysqld_error.h:
  Manual merge.
sql/mysql_priv.h:
  Manual merge.
sql/share/czech/errmsg.txt:
  Manual merge.
sql/share/danish/errmsg.txt:
  Manual merge.
sql/share/dutch/errmsg.txt:
  Manual merge.
sql/share/english/errmsg.txt:
  Manual merge.
sql/share/estonian/errmsg.txt:
  Manual merge.
sql/share/french/errmsg.txt:
  Manual merge.
sql/share/german/errmsg.txt:
  Manual merge.
sql/share/greek/errmsg.txt:
  Manual merge.
sql/share/hungarian/errmsg.txt:
  Manual merge.
sql/share/italian/errmsg.txt:
  Manual merge.
sql/share/japanese/errmsg.txt:
  Manual merge.
sql/share/korean/errmsg.txt:
  Manual merge.
sql/share/norwegian-ny/errmsg.txt:
  Manual merge.
sql/share/norwegian/errmsg.txt:
  Manual merge.
sql/share/polish/errmsg.txt:
  Manual merge.
sql/share/portuguese/errmsg.txt:
  Manual merge.
sql/share/romanian/errmsg.txt:
  Manual merge.
sql/share/russian/errmsg.txt:
  Manual merge.
sql/share/serbian/errmsg.txt:
  Manual merge.
sql/share/slovak/errmsg.txt:
  Manual merge.
sql/share/spanish/errmsg.txt:
  Manual merge.
sql/share/swedish/errmsg.txt:
  Manual merge.
sql/share/ukrainian/errmsg.txt:
  Manual merge.
sql/sp_head.cc:
  Manual merge.
2004-09-08 13:29:21 +04:00
unknown
7de077f7df test of updating and fetching from the same table check (BUG##5157)
mysql-test/r/lowercase_view.result:
  test of updating and fetching from the same table check
mysql-test/r/view.result:
  test of updating and fetching from the same table check
mysql-test/t/lowercase_view.test:
  test of updating and fetching from the same table check
mysql-test/t/view.test:
  test of updating and fetching from the same table check
sql/mysql_priv.h:
  unique table test
sql/sql_base.cc:
  unique table test which take into account views added
sql/sql_delete.cc:
  unique table test which take into account views added
sql/sql_insert.cc:
  unique table test which take into account views added
sql/sql_parse.cc:
  unique table test which take into account views added
sql/sql_update.cc:
  unique table test which take into account views added
sql/sql_view.cc:
  unique table test which take into account views added
sql/table.h:
  save next independent (do not belong to current view) table
2004-09-08 10:18:04 +03:00
unknown
52ac4935e7 WL#1218 "Triggers". Some very preliminary version of patch.
Mostly needed for Monty for him getting notion what needed for triggers 
from new .FRM format. 

Things to be done:
- Right placement of trigger's invocations
- Right handling of errors in triggers (including transaction rollback)
- Support for priviliges
- Right handling of DROP/RENAME table (hope that it will be handled automatically
  with merging of .TRG into .FRM file)
- Saving/restoring some information critical for trigger creation and replication
  with their definitions (e.g. sql_mode, creator, ...)
- Replication

Already has some known bugs so probably not for general review.


include/mysqld_error.h:
  Added trigger related error codes.
sql/Makefile.am:
  Added sql_trigger.* files to list of sources from which mysqld is built.
sql/item.cc:
  Added Item_trigger_field class representing field of new/old version of row which is 
  inserted/updated/deleted and for which trigger is invoked.
sql/item.h:
  Added enums for describing trigger properties. (Here because of dependencies).
  Added Item_trigger_field class representing field of new/old version of row which is 
  inserted/updated/deleted and for which trigger is invoked.
sql/item_func.cc:
  Added Item_func_set_user_var::print_as_stmt() for printing of assignment to ser variable
  from stored procedures.
  Added comment clarifying why we don't need set no_send_ok when calling stored functions.
sql/item_func.h:
  Added Item_func_set_user_var::print_as_stmt() for printing of assignment to ser variable
  from stored procedures.
sql/lex.h:
  Symbols used in statements defining triggers were added.
sql/mysql_priv.h:
  Exported some functions needed for triggers implementation.
sql/parse_file.cc:
  Cleaned up FILE_OPTIONS_STRLIST handling (needed for triggers).
sql/parse_file.h:
  Cleaned up FILE_OPTIONS_STRLIST handling (needed for triggers).
sql/share/czech/errmsg.txt:
  Added trigger related error messages.
sql/share/danish/errmsg.txt:
  Added trigger related error messages.
sql/share/dutch/errmsg.txt:
  Added trigger related error messages.
sql/share/english/errmsg.txt:
  Added trigger related error messages.
sql/share/estonian/errmsg.txt:
  Added trigger related error messages.
sql/share/french/errmsg.txt:
  Added trigger related error messages.
sql/share/german/errmsg.txt:
  Added trigger related error messages.
sql/share/greek/errmsg.txt:
  Added trigger related error messages.
sql/share/hungarian/errmsg.txt:
  Added trigger related error messages.
sql/share/italian/errmsg.txt:
  Added trigger related error messages.
sql/share/japanese/errmsg.txt:
  Added trigger related error messages.
sql/share/korean/errmsg.txt:
  Added trigger related error messages.
sql/share/norwegian-ny/errmsg.txt:
  Added trigger related error messages.
sql/share/norwegian/errmsg.txt:
  Added trigger related error messages.
sql/share/polish/errmsg.txt:
  Added trigger related error messages.
sql/share/portuguese/errmsg.txt:
  Added trigger related error messages.
sql/share/romanian/errmsg.txt:
  Added trigger related error messages.
sql/share/russian/errmsg.txt:
  Added trigger related error messages.
sql/share/serbian/errmsg.txt:
  Added trigger related error messages.
sql/share/slovak/errmsg.txt:
  Added trigger related error messages.
sql/share/spanish/errmsg.txt:
  Added trigger related error messages.
sql/share/swedish/errmsg.txt:
  Added trigger related error messages.
sql/share/ukrainian/errmsg.txt:
  Added trigger related error messages.
sql/sp_head.cc:
  sp_head::init_strings(): added support for triggers 
    (we don't have most of strings for them)
  sp_head::execute_function(): triggers don't require RETURN
  sp_head::reset_lex(): added propagation of trigger properties to LEX used for 
   parsing of statements composing trigger body.
  Added two more SP instructions:
  - sp_instr_set_user_var for setting user variables in stored functions and triggers
    (we can't use sp_instr_stmt and "SET @a:=..." statement since it will close open 
    tables and thus break execution of calling statement.
  - sp_instr_set_trigger_field for assignment to fields of row being updated/inserted in
    triggers
sql/sp_head.h:
  Added new type of sp_head object - TYPE_ENUM_TRIGGER
  Added two more SP instructions:
  - sp_instr_set_user_var for setting user variables in stored functions and triggers
    (we can't use sp_instr_stmt and "SET @a:=..." statement since it will close open 
    tables and thus break execution of calling statement.
  - sp_instr_set_trigger_field for assignment to fields of row being updated/inserted in
    triggers
sql/sql_base.cc:
  Now freeing memory occupied by trigger related structures when closing tables.
  open_unireg_entry(): added loading of triggers for table.
  find_field_in_real_table() is now public since it required by Item_trigger_field in item.cc
sql/sql_delete.cc:
  Added triggers invocation for DELETE (should be fixed for sure :))
sql/sql_insert.cc:
  Added triggers invocation for INSERT (should be fixed for sure :))
sql/sql_lex.cc:
  Added trg_new_row_fake_var variable pointer to which is used for distinguishing between
  assignment to NEW row field (when parsing trigger definition) and structured variable.
  Added initialization of LEX->trg_table to lex_start(). (When triggers are parsed during
  opening of table it points to table object.)
sql/sql_lex.h:
  Added trigger related commands.
  Added st_trg_chistics structure describing properties of trigger being created
  (as struct and as LEX member).
  Added trg_new_row_fake_var variable pointer to which is used for
  distinguishing between assignment to NEW row field (when parsing trigger definition)
  and structured variable.
  Added LEX::trg_table which points to table being opened when we are parsing trigger
  definition while opening table.
sql/sql_parse.cc:
  Added support for CREATE/DROP TRIGGER commands.
sql/sql_table.cc:
  Cleanup. close_cached_table() always returns 0 and its result is not analyzed in most
  places so chenged its return type to void.
sql/sql_update.cc:
  Added triggers invocation for UPDATE (should be fixed for sure :))
sql/sql_yacc.yy:
  Added support for CREATE/DROP TRIGGER statements.
  Added support for OLD/NEW row identifiers in trigger.
  Made assignment to user variables not to break execution of stored function or trigger.
sql/table.h:
  Added TABLE::triggers member representing triggers for this table.
2004-09-07 16:29:46 +04:00
unknown
c05fbd4c0b merge
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/share/czech/errmsg.txt:
  Auto merged
sql/share/danish/errmsg.txt:
  Auto merged
sql/share/dutch/errmsg.txt:
  Auto merged
sql/share/english/errmsg.txt:
  Auto merged
sql/share/estonian/errmsg.txt:
  Auto merged
sql/share/french/errmsg.txt:
  Auto merged
sql/share/german/errmsg.txt:
  Auto merged
sql/share/greek/errmsg.txt:
  Auto merged
sql/share/hungarian/errmsg.txt:
  Auto merged
sql/share/italian/errmsg.txt:
  Auto merged
sql/share/japanese/errmsg.txt:
  Auto merged
sql/share/korean/errmsg.txt:
  Auto merged
sql/share/norwegian-ny/errmsg.txt:
  Auto merged
sql/share/norwegian/errmsg.txt:
  Auto merged
sql/share/polish/errmsg.txt:
  Auto merged
sql/share/portuguese/errmsg.txt:
  Auto merged
sql/share/romanian/errmsg.txt:
  Auto merged
sql/share/russian/errmsg.txt:
  Auto merged
sql/share/serbian/errmsg.txt:
  Auto merged
sql/share/slovak/errmsg.txt:
  Auto merged
sql/share/spanish/errmsg.txt:
  Auto merged
sql/share/swedish/errmsg.txt:
  Auto merged
sql/share/ukrainian/errmsg.txt:
  Auto merged
sql/table.h:
  Auto merged
2004-09-06 15:56:38 +03:00
unknown
981b3d0ee3 merge
mysql-test/r/view.result:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
2004-09-05 22:14:27 +03:00
unknown
d75ea9bcd6 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0


mysql-test/r/view.result:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
2004-09-04 15:32:13 +03:00
unknown
99be6d3060 Merge with pulled code
mysql-test/r/view.result:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.h:
  Auto merged
tests/client_test.c:
  Auto merged
sql/sql_base.cc:
  Merge
sql/sql_insert.cc:
  Merge
sql/sql_select.cc:
  Merge
sql/sql_view.cc:
  Merge
sql/table.cc:
  Merge
2004-09-03 22:38:45 +03:00
unknown
d0211cf5be Cleanup of new code pushed into 5.0 since last pull
Merged the different find_xxxx_table_in_list functions to one + some inline functions


mysql-test/r/view.result:
  Fix result (remove not used view from show tables)
sql/item_subselect.cc:
  Remove not used functions
sql/item_subselect.h:
  Remove not used functions
sql/mysql_priv.h:
  Merged the different find_xxxx_table_in_list functions to one + some inline functions
sql/sql_acl.cc:
  More debugging + simple cleanups
sql/sql_base.cc:
  Merged the different find_xxxx_table_in_list functions to one + some inline functions
  Indentation cleanups & more comments
sql/sql_delete.cc:
  Namechange
sql/sql_insert.cc:
  Simple optimizations & Style cleanups
  Merged common code (in mysql_prepare_insert_check_table)
sql/sql_lex.cc:
  function name changes
  More comments
sql/sql_parse.cc:
  Function name changes
  Made check_one_table_access returning bool
  More debugging in 'check_access'
  Added function 'check_some_access', which is used when creating a view
sql/sql_prepare.cc:
  Resetting flag directly after test makes code easier to read
sql/sql_select.cc:
  Code simplifications
sql/sql_show.cc:
  Indentation cleanups.
  Fixed typo in name
sql/sql_update.cc:
  Function name change
sql/sql_view.cc:
  Simple optimizations.
  Style fixes.
  Remove view_field_names[]
  Simplified 'check_key_in_view()'
sql/table.cc:
  Simplified new code in openfrm()
  variable name change i -> item
  Indentation changes
sql/table.h:
  Fixed typo in variable name
  Method name change in field iterator: end() -> end_of_fields()
tests/client_test.c:
  Changed number to macro
2004-09-03 21:43:04 +03:00
unknown
1948909aee ufter review fix
sql/sql_view.cc:
  name of variable changed to make merge easy
  removed charset field
sql/table.h:
  removed charset field
  layout fixed
2004-09-03 21:38:01 +03:00
unknown
704fb6daf7 CHECK OPTIONs added (WL#1983)
include/mysqld_error.h:
  new error messages
mysql-test/r/view.result:
  test of CHECK OPTION in a views
mysql-test/t/view.test:
  test of CHECK OPTION in a views
sql/share/czech/errmsg.txt:
  new error messages
sql/share/danish/errmsg.txt:
  new error messages
sql/share/dutch/errmsg.txt:
  new error messages
sql/share/english/errmsg.txt:
  new error messages
sql/share/estonian/errmsg.txt:
  new error messages
sql/share/french/errmsg.txt:
  new error messages
sql/share/german/errmsg.txt:
  new error messages
sql/share/greek/errmsg.txt:
  new error messages
sql/share/hungarian/errmsg.txt:
  new error messages
sql/share/italian/errmsg.txt:
  new error messages
sql/share/japanese/errmsg.txt:
  new error messages
sql/share/korean/errmsg.txt:
  new error messages
sql/share/norwegian-ny/errmsg.txt:
  new error messages
sql/share/norwegian/errmsg.txt:
  new error messages
sql/share/polish/errmsg.txt:
  new error messages
sql/share/portuguese/errmsg.txt:
  new error messages
sql/share/romanian/errmsg.txt:
  new error messages
sql/share/russian/errmsg.txt:
  new error messages
sql/share/serbian/errmsg.txt:
  new error messages
sql/share/slovak/errmsg.txt:
  new error messages
sql/share/spanish/errmsg.txt:
  new error messages
sql/share/swedish/errmsg.txt:
  new error messages
sql/share/ukrainian/errmsg.txt:
  new error messages
sql/sql_insert.cc:
  CHECK OPTIONs added
sql/sql_lex.h:
  CHECK OPTIONs added
sql/sql_update.cc:
  CHECK OPTIONs added
sql/sql_view.cc:
  new parameter added
  returnrd values fixed
sql/sql_yacc.yy:
  CHECK OPTIONs added
sql/table.cc:
  CHECK OPTIONs added
sql/table.h:
  CHECK OPTIONs added
2004-09-03 15:18:40 +03:00
unknown
a3695785e4 system charset (with wich VIEW printed) saved in .frm and restored before parsing view (BUG#5163)
mysql-test/r/view.result:
  VIEWs with national characters
mysql-test/t/view.test:
  VIEWs with national characters
sql/sql_view.cc:
  system charset (with wich VIEW printed) saved in .frm and restored before parsing view
sql/table.h:
  system charset (with wich VIEW printed) saved in .frm
2004-09-01 22:48:59 +03:00
unknown
d3423ca699 ORDER clause printing fixed (BUG#5156)
mysql-test/r/subselect.result:
  ORDER clause printing fixed
mysql-test/r/view.result:
  order by refers on integer field
mysql-test/t/view.test:
  order by refers on integer field
sql/sql_lex.cc:
  ORDER clause printing fixed
sql/sql_parse.cc:
  fields for correct ORDER printing added
sql/sql_select.cc:
  fields for correct ORDER printing added
sql/table.h:
  fields for correct ORDER printing added
2004-08-31 11:58:45 +03:00
unknown
46a0c8a7df sending right error message where VIEW is not expected (BUG#4606)
mysql-test/r/view.result:
  using VIEW where table is required
mysql-test/t/view.test:
  using VIEW where table is required
sql/sql_base.cc:
  sending right error message where VIEW is not expected
sql/sql_view.h:
  frm_type_enum moved to table.h becuae used in TABLE_LIST
sql/table.h:
  frm_type_enum moved to table.h becuae used in TABLE_LIST
2004-08-24 15:37:51 +03:00
unknown
dc4de8d562 made different fields for view updatebility in principle and updatability during this execution (BUG#4601)
mysql-test/r/view.result:
  fixed ps variavles test
  test of view built over updatable view
mysql-test/t/view.test:
  fixed ps variavles test
  test of view built over updatable view
sql/sql_acl.cc:
  mpre optimal locking (found by Monty)
sql/sql_view.cc:
  made different fields for view updatebility in principle and updatability during this execution
sql/table.h:
  made different fields for view updatebility in principle and updatability during this execution
2004-07-22 17:52:04 +03:00