Commit graph

6745 commits

Author SHA1 Message Date
unknown
a1820ab1ca Merge mishka.local:/tmp/skr99/mysql-5.0
into  mishka.local:/home/my/mysql-5.0


sql/item_strfunc.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
2005-08-21 13:05:15 +03:00
unknown
9df32ec8f8 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/Users/emurphy/src/bk-clean/mysql-4.1
2005-08-20 22:33:45 -04:00
unknown
fad7a4ba9b Merge spachev@bk-internal.mysql.com:/home/bk/mysql-4.1
into  asksasha.com:/reiser-data/mysql-dev/mysql-4.1
2005-08-20 16:09:59 -06:00
unknown
b221b549dd Merge c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-4.1
into  c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.0


heap/hp_delete.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/distinct.result:
  Manual merge
mysql-test/t/distinct.test:
  Manual merge
2005-08-20 16:38:55 -04:00
unknown
3eda70b270 Fixes during review of new pushed code
Fixed new bug when running a SP without a default database


mysql-test/r/information_schema.result:
  Added test to cover changes made in default handling
mysql-test/r/sp-security.result:
  Added test when executing SP without a default database
mysql-test/t/information_schema.test:
  Added test to cover changes made in default handling
mysql-test/t/sp-security.test:
  Added test when executing SP without a default database
sql/item_strfunc.cc:
  Removed wrong push
sql/mysqld.cc:
  Indentation fix
sql/sql_base.cc:
  Use share->db instead of share->table_cache_key
  Remove assert that can never fail (because of test in previous row)
sql/sql_db.cc:
  Allow empty database name when called from SP
  (To allow on run without a default database)
sql/sql_parse.cc:
  Added comment
sql/sql_show.cc:
  Indentation fixes
  Simplified code by checking for 'wrong' condition first and doing continue instead of going down one level
  Simplified precision and decimal handling
2005-08-20 11:00:00 +03:00
unknown
07e1b729dd Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into rurik.mysql.com:/home/igor/mysql-5.0
2005-08-19 22:06:43 -07:00
unknown
3a143f4888 Manual merge
sql/sql_select.cc:
  Auto merged
2005-08-19 20:21:09 -07:00
unknown
4c17cdc108 Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-19 17:53:48 -07:00
unknown
77069fc529 Add test that got dropped in automerge
mysql-test/r/ctype_cp932.result:
  Fix wrong auto-merge
mysql-test/t/ctype_cp932.test:
  Fix wrong automerge.
2005-08-19 19:08:47 -04:00
unknown
05001e7504 Fix cases where SLEEP() calls would get optimized away or cached. (Bug #12689)
mysql-test/r/func_misc.result:
  Add new results
mysql-test/t/func_misc.test:
  Add new regression test.
sql/item_create.cc:
  When SLEEP() is used, mark the statement as uncacheable.
sql/item_func.h:
  Flag SLEEP() as not constant, and set RAND_TABLE_BIT so that it is
  always evaluated.
2005-08-19 15:51:40 -07:00
unknown
ab39c1baf1 Fix ctype_cp932 test to be deterministic on different machines.
mysql-test/r/ctype_cp932.result:
  Update results to make them deterministic
mysql-test/t/ctype_cp932.test:
  Updated test to be deterministic on all machines
2005-08-19 17:55:28 -04:00
unknown
5ff24316d9 Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0
2005-08-19 12:10:34 -07:00
unknown
1b970e94e0 Bug#11338 Fixes from review (identical functionality).
include/my_sys.h:
  Fixes from review (use version in log_event.cc instead)
mysql-test/r/ctype_cp932.result:
  Updated test for bug#11338 (logging of prepared statement w/ blob type)
mysql-test/t/ctype_cp932.test:
  udpated test for bug#11338 (logging of prepared statement w/ blob type)
mysys/charset.c:
  Fixes from review (use version in log_event.cc instead)
sql/item.cc:
  Fixes from review (store character_set_client differently so that
  fix can be merged forward to 5.0)
sql/item.h:
  Fixes from review
sql/log_event.cc:
  Fixes from review, str_to_hex is now used by item.cc
sql/log_event.h:
  Added prototype for str_to_hex (now used by item.cc)
sql/sql_prepare.cc:
  Fixes from review, store character_set_client differently so that 
  Item_param::query_val_str can use it.
2005-08-19 14:49:34 -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
e39656fb3b Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486
2005-08-19 16:05:58 +03:00
unknown
276bd123b7 A fix and a test case for "Bug #12168 'DECLARE CONTINUE HANDLER FOR
NOT FOUND ...' in conditional handled incorrectly".

Whenever we remove an instruction during optimization, we need to
adjust instruction numbers (ip - instruction pointer) stored in all
instructions. In addition to that, sp_instr_hpush_jump, which 
corresponds to DECLARE CONTINUE HANDLER needs adjustment for m_handler,
which holds the number of instruction with the continue handler.
In the bug report, a wrong ip stored in m_handler was pointing at 
FETCH, which resulted in an error message and abnormal SP termination.
The fix is to just remove m_handler member from sp_instr_hpush_jump,
as it's always points to the instruction next to the DECLARE
statement itself (m_ip+1).


mysql-test/r/sp.result:
  Test results fixed (Bug#12168)
mysql-test/t/sp.test:
  A test case for Bug#12168 "'DECLARE CONTINUE HANDLER FOR NOT
  FOUND ...' in conditional handled incorrectly"
sql/sp_head.cc:
  Remove m_handler (the number of continue handler instruction)
  as it always equal to m_ip+1
sql/sp_head.h:
  Remove m_handler (the number of continue handler instruction)
  as it always equal to m_ip+1
2005-08-19 17:03:21 +04:00
unknown
f887aec2f3 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486
2005-08-19 15:32:00 +03: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
9ae442c3f7 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into  eel.(none):/home/jonas/src/mysql-5.0-push
2005-08-19 13:40:40 +02:00
unknown
01f4258a02 distinct.test, distinct.result:
Added test cases for bug #12625.
sql_select.cc:
  Fixed bug #12625.
  Fixed invalid removal of constant items from the DISTINCT
  list in the function create_distinct_group.


sql/sql_select.cc:
  Fixed bug #12625.
mysql-test/r/distinct.result:
  Added test cases for bug #12625.
mysql-test/t/distinct.test:
  Added test cases for bug #12625.
2005-08-19 01:57:22 -07:00
unknown
a77fe70f90 Merge eel.(none):/home/jonas/src/mysql-5.0-push
into  eel.(none):/home/jonas/tmp/kkk/mysql-5.0
2005-08-19 10:50:51 +02:00
unknown
9e9d610d30 fixed test after merge 2005-08-19 11:38:14 +03:00
unknown
4f16ca27ef Merge osalerma@bk-internal.mysql.com:/home/bk/mysql-5.0
into  127.(none):/home/osku/mysql-5.0


mysql-test/r/innodb.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
2005-08-19 11:34:04 +03:00
unknown
f77d6df850 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug2-5.0
2005-08-19 10:40:46 +03:00
unknown
429e0abb08 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy004.:/work/mysql-5.0-clean
2005-08-19 09:14:59 +02:00
unknown
fce5427ebe test fix for fix of 12591
mysql-test/r/innodb.result:
  fix result for fix of 12591
mysql-test/t/innodb.test:
  fix test for fix of 12591
2005-08-19 09:08:41 +02:00
unknown
b9314a4f89 changes in row operation 2005-08-19 09:46:59 +03:00
unknown
bba824eb85 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug2-5.0


sql/item_cmpfunc.cc:
  Auto merged
2005-08-19 08:55:38 +03:00
unknown
d2797ea959 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into  eel.(none):/home/jonas/src/mysql-5.0-push
2005-08-19 07:52:42 +02: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
a166d8ca2e Manual merge 2005-08-18 15:17:04 -07:00
unknown
4cd0ef4978 Merge lmy004.:/work/mysql-5.0-clean
into lmy004.:/work/mysql-5.0-bug12591


sql/sql_show.cc:
  Auto merged
2005-08-18 23:40:04 +02:00
unknown
88a7d01eba Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/10624-bug-5.0-mysql


sql/sql_lex.cc:
  Auto merged
2005-08-18 22:46:17 +04:00
unknown
b1921c85ba Fix for bug #11896 "Partial locking in case of recursive trigger definitions".
If we are in stored function or trigger we should ensure that we won't change
table that is already used by calling statement (this can damage table or
easily cause infinite loops). Particularly this means that recursive triggers
should be disallowed.


mysql-test/r/sp-error.result:
  Added tests checking that in functions we don't allow to update tables which
  are used by statements which invoke these functions.
mysql-test/r/trigger.result:
  Added test for bug #11896 "Partial locking in case of recursive trigger
  definitions".
mysql-test/t/sp-error.test:
  Added tests checking that in functions we don't allow to update tables which
  are used by statements which invoke these functions.
mysql-test/t/trigger.test:
  Added test for bug #11896 "Partial locking in case of recursive trigger
  definitions".
sql/share/errmsg.txt:
  Added error messages for complaining about situations when in function or
  trigger we try to change table which is used in statement invoking this
  function or trigger.
sql/sql_base.cc:
  open_table():
    If we are in stored function or trigger we should ensure that
    we won't change table that is already used by calling statement
    (this can damage table or easily cause infinite loops).
    So if we are opening table for writing, we should check that it
    is not already open by some calling stamement.
2005-08-18 19:07:23 +04:00
unknown
0b8e774e5f Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/item_strfunc.cc:
  Auto merged
2005-08-18 07:59:43 -07:00
unknown
6ea6df4e53 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2005-08-18 05:36:22 -07:00
unknown
4e46284373 Merge eel.(none):/home/jonas/src/mysql-5.0
into  eel.(none):/home/jonas/src/mysql-5.0-push


mysql-test/t/ndb_config.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
mysql-test/t/ndb_alter_table.test:
  merge
2005-08-18 14:28:13 +02:00
unknown
ebb2e53a37 Merge eel.(none):/home/jonas/src/mysql-4.1
into  eel.(none):/home/jonas/src/mysql-5.0


mysql-test/r/ndb_alter_table.result:
  Auto merged
ndb/include/ndbapi/NdbDictionary.hpp:
  Auto merged
ndb/src/kernel/SimBlockList.cpp:
  Auto merged
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  Auto merged
ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  Auto merged
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Auto merged
ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
  Auto merged
ndb/src/kernel/blocks/qmgr/QmgrInit.cpp:
  Auto merged
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
ndb/src/kernel/blocks/suma/Suma.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
ndb/src/ndbapi/DictCache.cpp:
  Auto merged
ndb/src/ndbapi/DictCache.hpp:
  Auto merged
ndb/src/ndbapi/TransporterFacade.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
mysql-test/t/ndb_alter_table.test:
  merge
ndb/src/common/util/version.c:
  merge
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  merge
2005-08-18 14:25:00 +02:00
unknown
bdbe25de9b Merge eel.(none):/home/jonas/src/mysql-4.1
into  eel.(none):/home/jonas/src/mysql-4.1-push


mysql-test/t/ndb_config.test:
  Auto merged
ndb/src/common/util/version.c:
  Auto merged
ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
  Auto merged
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
ndb/src/ndbapi/TransporterFacade.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
mysql-test/t/ndb_alter_table.test:
  merge
2005-08-18 14:07:31 +02:00
unknown
c7744c6df5 bug#12118 - ndb alter table data loss
Split table version into 2 (major, minor)
  Impl. signaling to API when table has been altered
  Allow running transactions to use any minor number for transactions


mysql-test/r/ndb_alter_table.result:
  Allow running transactions to use old table definition when possible.
mysql-test/t/ndb_alter_table.test:
  Allow running transactions to use old table definition when possible.
ndb/include/kernel/BlockNumbers.h:
  remove GREP
ndb/include/kernel/GlobalSignalNumbers.h:
  Add ALTER_TABL_REP and API_BROADCAST_REP
ndb/include/kernel/kernel_types.h:
  table_version_major
ndb/include/kernel/signaldata/AlterTable.hpp:
  New error code for alter table during rolling upgrade
ndb/include/ndbapi/NdbDictionary.hpp:
  Add state on table object to represent an altered but still valid table object
ndb/src/common/debugger/BlockNames.cpp:
  remove GREP
ndb/src/common/util/version.c:
  Fix upgrades
ndb/src/kernel/SimBlockList.cpp:
  remove GREP
ndb/src/kernel/blocks/Makefile.am:
  remove GREP
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  remove GREP
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Split tableSchemaVersion into 2 part
  24 bit real version
   8 bit for online alter table where old table definition is still usable
ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  Check for same ndb versions
ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp:
  Update schema printer
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  remove grep
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  1) Use table_ version_major when checking table version
  2) Dummy fix for BUG that tableSchemaVersion is only 16 bit in LQHKEYREQ
ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  1) Use table_ version_major when checking table version
  2) Dummy fix for BUG that tableSchemaVersion is only 16 bit in LQHKEYREQ
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  1) Use table_ version_major when checking table version
  2) Dummy fix for BUG that tableSchemaVersion is only 16 bit in LQHKEYREQ
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  remove GREP
ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
  Add support for sending REP to ALL api nodes
ndb/src/kernel/blocks/qmgr/QmgrInit.cpp:
  Add support for sending REP to ALL api nodes
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Add support for sending REP to ALL api nodes
ndb/src/kernel/blocks/suma/Suma.cpp:
  remove GREP
ndb/src/mgmsrv/MgmtSrvr.cpp:
  remove GREP
ndb/src/ndbapi/DictCache.cpp:
  Add support for alter_table_rep
    by setting status to Altered
  
  NOTE special handling of tables in state RETREIVING
ndb/src/ndbapi/DictCache.hpp:
  Add support for alter_table_rep
    by setting status to Altered
  
  NOTE special handling of tables in state RETREIVING
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Change alter table so that remove from global cache is used wo/ retreiving it from there first
    as ALTER_TABLE_REP might already have changed the table object...
ndb/src/ndbapi/TransporterFacade.cpp:
  Add support for ALTER_TABLE_REP
sql/ha_ndbcluster.cc:
  Allow running transactions to use tables in state ALTERED...but new transactions may not...
ndb/include/kernel/signaldata/ApiBroadcast.hpp:
  New BitKeeper file ``ndb/include/kernel/signaldata/ApiBroadcast.hpp''
2005-08-18 14:02:25 +02:00
unknown
8d593d499d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usersnfs/pchardin/mysql-5.0
2005-08-18 11:25:32 +02:00
unknown
fa19a9f246 Fix for Bug#11247 Stored procedures: Function calls in long loops leak memory
and Bug#12297 SP crashes the server if data inserted inside a lon loop
Third commit attempt. With fixes to the issues, showed up after full rebuild and
tests on other hosts.


mysql-test/r/rpl_sp.result:
  New warnings appeared in result file, as now we always create spcont in a stored routine.
  This is correct behaviour. We swallowed some warnings, as we used thd->spcont to check whether
  we are in the SP though we didn't set spcont in certain cases. This is fixed now.
mysql-test/r/sp.result:
  fixed result file to reflect new tests
mysql-test/t/sp.test:
  Added tests for bugs. Though one of them is disabled, as it fails because of the other bug.
  It should be enabled, when bug 12297 is fixed.
sql/sp_head.cc:
  Per-instruction arena is implemented
sql/sp_rcontext.cc:
   Now we should deal with callers_arena->free_list when we employ reuse mechanism with callers_arena
   switched during sp_eval_func_item
sql/sp_rcontext.h:
  Add new member to sp_rcontext class, in order to handle instructions with assignment
  and/or with nested SP processing properly.
2005-08-18 11:23:54 +02:00
unknown
341f822126 stop on NULL comparison only if it is allowed (BUG#12509)
mysql-test/r/row.result:
  Correct NULL handling in row comporison
mysql-test/t/row.test:
  Correct NULL handling in row comporison (BUG#12509)
sql/item_cmpfunc.cc:
  stop on NULL comparison only if it is allowed
sql/item_cmpfunc.h:
  support optimisation in case of processing WHERE/HAVING, where NULL and FALSE are equal
2005-08-18 12:07:14 +03:00
unknown
c9fa6a47bd view.test:
Added a test case for bug #10970.
view.result:
  Added a test case for bug #10970.
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE.
sql_view.cc:
  Fixed bug #10970.
  In the function mysql_create_view if a view does not refer
  any tables directly the variable table must be updated
  after the call of open_and_lock_tables.
errmsg.txt:
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE
  (when fixing bug #10970).


sql/share/errmsg.txt:
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE
  (when fixing bug #10970).
sql/sql_view.cc:
  Fixed bug #10970.
  In the function mysql_create_view if a view does not refer
  any tables directly the variable table must be updated
  after the call of open_and_lock_tables.
mysql-test/r/view.result:
  Fixed bug #10970.
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE.
mysql-test/t/view.test:
  Added a test case for bug #10970.
2005-08-17 22:19:12 -07:00
unknown
6dfb784791 Revert patch for Bug #12595, it causes the sql_mode test to fail.
mysql-test/r/select.result:
  Update results
mysql-test/t/select.test:
  Remove regression test
sql/item_cmpfunc.cc:
  Revert patch for checking length of ESCAPE, it is not correct.
2005-08-17 19:56:14 -07:00
unknown
cf7b1241d1 sql_view.cc:
correct exit from mysql_create_view to restore ennvironment (BUG#12468)
view.result, view.test:
  test of CRETE VIEW in SP


mysql-test/t/view.test:
  test of CRETE VIEW in SP
mysql-test/r/view.result:
  test of CRETE VIEW in SP
sql/sql_view.cc:
  correct exit from mysql_create_view to restore ennvironment
2005-08-17 22:42:53 +03:00
unknown
6345af6d47 Merge spachev@bk-internal.mysql.com:/home/bk/mysql-4.1
into  asksasha.com:/reiser-data/mysql-dev/mysql-4.1


sql/mysql_priv.h:
  Auto merged
2005-08-17 12:39:30 -06:00
unknown
7370b241a1 fix for bug #12591 (SHOW TABLES FROM dbname produces wrong error message)
mysql-test/r/show_check.result:
  results for test for bug #12591
mysql-test/t/show_check.test:
  test for bug #12591
sql/sql_show.cc:
  don't let my_dir() emit a message bug catch the errno (my_errno - a thread specific variable) and check it for ENOENT - not existing.
  For other errors emulate the message used to be emitted by my_dir()
2005-08-17 17:51:10 +02:00
unknown
18025ae9f1 Merge mysql.com:/home/alexi/mysql-5.0
into  mysql.com:/home/alexi/dev/mysql-5.0-1
2005-08-17 18:46:20 +04: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
7d423fed15 Merge osalerma@bk-internal.mysql.com:/home/bk/mysql-5.0
into  127.(none):/home/osku/mysql-5.0


sql/ha_innodb.cc:
  Auto merged
2005-08-17 11:11:50 +03:00
unknown
fa31a9950b Fix bug #11946, truncate not always resetting the auto-increment counter
in InnoDB tables.


mysql-test/r/innodb.result:
  New tests.
mysql-test/t/innodb.test:
  New tests.
sql/ha_innodb.cc:
  Add reset_auto_increment.
sql/ha_innodb.h:
  Add reset_auto_increment.
sql/handler.h:
  Add reset_auto_increment.
sql/sql_delete.cc:
  Call handler->reset_auto_increment when needed.
2005-08-17 11:00:20 +03:00
unknown
3eb66207ae Merge mysql.com:/home/alexi/mysql-5.0
into  mysql.com:/home/alexi/dev/mysql-5.0-1
2005-08-16 23:33:06 +04:00
unknown
c1f1118335 information_schema.test:
Added a comment line for a test case used for bug #12301.
information_schema.result:
  Fixed some test cases results (bug #12301).
sql_show.cc:
  Fixed bug #12301.
  The bug was due to a missing value setting for the NUMERIC_SCALE column
   in the get_schema_column_record() function (sql_show.cc).


sql/sql_show.cc:
  Fixed bug #12301.
  The bug was due to a missing value setting for the NUMERIC_SCALE column
   in the get_schema_column_record() function (sql_show.cc).
mysql-test/r/information_schema.result:
  Fixed some test cases results (bug #12301).
mysql-test/t/information_schema.test:
  Added a comment line for a test case used for bug #12301.
2005-08-16 23:11:04 +04:00
unknown
06ebdbb785 Fix bug #11398 Bug in field_conv() results in wrong result of join with index
When copying varchar fields with field_conv() it's not taken into account
that length_bytes of source and destination fields may be different.
This results in saving wrong data in field and making wrong key later.

Added check so if fields are varchar and have different length_bytes they
are not copied by memcpy().


sql/field_conv.cc:
  Fix bug #11398 Bug in field_conv() results in wrong result of join with index
mysql-test/t/select.test:
  Test case for bug #11398 Bug in field_conv() results in wrong result of join with index
mysql-test/r/select.result:
  Test case for bug #11398 Bug in field_conv() results in wrong result of join with index
2005-08-16 22:13:43 +04:00
unknown
9b5b5d6f97 BUG#10267 mysqltest, wrong number of loops when a script is sourced within a loop
client/mysqltest.c:
  Don't open a sourced file more than once as it will already have been read into the q_lines cache
mysql-test/r/mysqltest.result:
  Added tests for source command inside of while loop
mysql-test/t/mysqltest.test:
  Added tests for source command inside of while loop
2005-08-16 17:10:52 +02:00
unknown
8056a7df59 fix for bug #12595 (Escape character has to be exactly one)
mysql-test/r/select.result:
  results for test of bug 12595
mysql-test/t/select.test:
  test for bug #12595
sql/item_cmpfunc.cc:
  check whether the size of the escape string is exactly 1 (bug #12595)
2005-08-16 15:39:40 +02:00
unknown
ef5cafdf6d Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy004.wdf.sap.corp:/work/mysql-5.0-clean
2005-08-16 11:22:29 +02:00
unknown
1566ec35d6 fix for bug #12183 "SHOW OPEN TABLES behavior doesn't match grammar"
(after review commit)


mysql-test/r/show_check.result:
  test the extended functionality (so far not documented) of SHOW OPEN FILES
mysql-test/t/show_check.test:
  test the extended functionality (so far not documented) of SHOW OPEN FILES
sql/mysql_priv.h:
  pass the name of the database for checking
sql/sql_base.cc:
  first check against the db if present (SHOW OPEN FILES FROM xxx)
  then do wild compare but only against the table name
sql/sql_show.cc:
  pass the DB if specified
2005-08-16 11:18:35 +02:00
unknown
5082c41bf3 Manual merge 2005-08-15 21:58:17 -07:00
unknown
4161d7cb0d subselect.result:
Added missing drop statement
subselect.test:
  Added missing drop statement.


mysql-test/t/subselect.test:
  Added missing dro statement.
mysql-test/r/subselect.result:
  Added missing drop statement
2005-08-15 21:43:46 -07:00
unknown
4b49cbfbd4 sql_select.cc:
Fixed bug #11479.
  The JOIN::reinit method cannot call setup_tables
  after the optimization phase since this function
  removes some optimization settings for joined
  tables. E.g. it resets values of the null_row flag to 0.
subselect.result, subselect.test:
  Added a test case for bug #11479.


mysql-test/t/subselect.test:
  Added a test case for bug #11479.
mysql-test/r/subselect.result:
  Added a test case for bug #11479.
sql/sql_select.cc:
  Fixed bug #11479.
  The JOIN::reinit method cannot call setup_tables
  after the optimization phase since this function
  removes some optimization settings for joined
  tables. E.g. it resets values of the null_row flag to 0.
2005-08-15 21:33:58 -07:00
unknown
c78623fa10 Clean up merge from 4.1
mysql-test/r/func_date_add.result:
  Update results
mysql-test/r/func_time.result:
  Update results
server-tools/instance-manager/protocol.cc:
  Fix call to list_rest()
sql/sp_head.cc:
  sp_change_db() removed, call mysql_change_db() instead.
2005-08-15 14:19:56 -07:00
unknown
d6a6a48861 Merge mysql.com:/home/jimw/my/mysql-5.0-12318
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-08-15 12:39:36 -07:00
unknown
163b04c3fa Merge mysql.com:/home/jimw/my/mysql-5.0-10627
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/share/errmsg.txt:
  SCCS merged
2005-08-15 12:38:56 -07:00
unknown
f6de082b08 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean


myisam/myisampack.c:
  Auto merged
mysql-test/r/metadata.result:
  Auto merged
mysys/list.c:
  Auto merged
mysys/thr_lock.c:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_test.cc:
  Auto merged
sql/mysqld.cc:
  SCCS merged
2005-08-15 12:37:45 -07:00
unknown
def42df9fe Fix bug #10624 Views with multiple UNION and UNION ALL produce incorrect
results.

st_select_lex_unit::print() was losing UNION ALL if in statement were present
UNION DISTINCT.


mysql-test/r/view.result:
  Test case for bug #10624  Views with multiple UNION and UNION ALL produce incorrect results.
mysql-test/t/view.test:
  Test case for bug #10624  Views with multiple UNION and UNION ALL produce incorrect results.
sql/sql_lex.cc:
  Fix bug #10624 Views with multiple UNION and UNION ALL produce incorrect results.
2005-08-15 23:05:05 +04:00
unknown
000a09baac Merge mysql.com:/home/jimw/my/mysql-4.1-11688
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-08-15 10:18:14 -07:00
unknown
219c84faba Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


sql/sql_show.cc:
  Auto merged
2005-08-15 20:12:28 +03:00
unknown
2fc78cb3fd Bug#12518
"COLUMN_DEFAULT has wrong value if NOT NULL is set"
  Show NULL instead of empty string when no default value is set


mysql-test/r/information_schema.result:
  test for bug 12518
mysql-test/t/information_schema.test:
  test for bug 12518
sql/sql_show.cc:
  report NULL for information schema result when there is no default value
2005-08-15 17:14:55 +01:00
unknown
c5aac211d0 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


sql/ha_berkeley.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_derived.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/share/errmsg.txt:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/sql_class.cc:
  Manual merge
2005-08-15 18:35:48 +03:00
unknown
a914b5274f Save and clear run context before executing a stored function or trigger and restore it afterwards.
This allows us to use statement replication with functions and triggers
The following things are fixed with this patch:
- NOW() and automatic timestamps takes the value from the main event for functions and triggers (which allows these to replicate with statement level logging)
- No side effects for triggers or functions with auto-increment values(), last_insert_id(), rand() or found_rows()
- Triggers can't return result sets

Fixes bugs:
#12480: NOW() is not constant in a trigger
#12481: Using NOW() in a stored function breaks statement based replication
#12482: Triggers has side effects with auto_increment values
#11587: trigger causes lost connection error


mysql-test/r/trigger.result:
  Added test fpr big
mysql-test/t/sp-error.test:
  Changed error message numbers
mysql-test/t/trigger.test:
  Added test for trigger returning result (#11587)
sql/item_func.cc:
  Store the first used seed value for RAND() value.
  (This makes rand() replicatable in functions and triggers)
  Save and clear run context before executing a stored function and restore it afterwards.
  This removes side effects of stored functions for RAND(), auto-increment values and NOW() and makes most stored function replicatable
sql/share/errmsg.txt:
  Reuse error message also for triggers
sql/sp_head.cc:
  If in function or trigger, don't change value of NOW()
  (This allows us to use statement replication with functions that directly or indirectly uses timestamps)
sql/sql_class.cc:
  Added framework for storing and retrieving run context while exceuting triggers or stored functions.
sql/sql_class.h:
  Added framework for storing and retrieving run context while exceuting triggers or stored functions.
sql/sql_parse.cc:
  If in function or trigger, don't change value of NOW()
  (This allows us to use statement replication with functions that directly or indirectly uses timestamps)
sql/sql_trigger.cc:
  Moved process_triggers function from sql_trigger.h
  Use reset/restore sub_statement_state while executing triggers to avoid side effects and make them replicatable
sql/sql_trigger.h:
  Moved process_triggers function from sql_trigger.h
  Use reset/restore sub_statement_state while executing triggers to avoid side effects and make them replicatable
sql/sql_yacc.yy:
  Give error message if trigger can return a result set (Bug #11587)
tests/fork_big2.pl:
  Removed return from end of lines
mysql-test/r/rpl_trigger.result:
  New BitKeeper file ``mysql-test/r/rpl_trigger.result''
mysql-test/t/rpl_trigger.test:
  New BitKeeper file ``mysql-test/t/rpl_trigger.test''
2005-08-15 18:15:12 +03:00
unknown
6ed4935212 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-11864


mysql-test/r/derived.result:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
2005-08-15 13:21:55 +04:00
unknown
6ff38ce778 Merge abelkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  hasky.mysql.fi:/home/sanja/work-merge-5.0


sql/sql_parse.cc:
  Auto merged
2005-08-13 11:16:26 +03:00
unknown
5afacbab51 item_subselect.cc:
postmerge fix
subselect.result:
  new 5.0 result (postmerge)


mysql-test/r/subselect.result:
  new 5.0 result (postmerge)
sql/item_subselect.cc:
  postmerge fix
2005-08-13 11:15:17 +03:00
unknown
ad888850c0 Merge abelkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  hasky.mysql.fi:/home/sanja/work-merge-5.0


mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/item_subselect.cc:
  merge
2005-08-13 08:19:34 +03:00
unknown
e8d9dccb3d Merge 50.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-4.1
into  50.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-bug2-4.1
2005-08-13 07:49:22 +03:00
unknown
208be175de Merge 50.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-4.1
into  50.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-bug2-4.1
2005-08-13 07:46:06 +03:00
unknown
19b4760f19 fixed convertion and handling IN subqueries with rows (BUG#11867)
mysql-test/r/subselect.result:
  testst of IN subqueries with row
mysql-test/t/subselect.test:
  tests of ion subqueries with row
sql/item.h:
  add method to prevent of removing Item_ref_null_helper from HAVING
sql/item_cmpfunc.h:
  Prevented removing of Item_test_isnotnull from HAVING
sql/item_subselect.cc:
  fixed converting row IN subqueries
sql/sql_select.cc:
  fixed debug print
2005-08-13 07:45:14 +03:00
unknown
03e8517cb2 merged
sql/ha_innodb.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-08-12 22:58:13 +02:00
unknown
87ae5a1597 BUG#12162 - one can start two transactions with the same XID.
Now we keep all active XID's in a hash
2005-08-12 21:15:01 +02:00
unknown
d32c4314ed Fix bug #12298 Typo in timestampdiff() function name results in erroneous
view being created.

Item_func_timestamp_diff::func_name() were returning function name as
"timestamp_diff" thus when view was executed function parameters wasn't 
properly recognized and error was raised.


mysql-test/r/func_time.result:
  Fix test result after bugfix #12298
sql/item_timefunc.h:
  Fix bug #12298 Typo in timestampdiff() function name results in wrong view being created.
mysql-test/t/view.test:
  Test case for bug #12298 Typo in timestampdiff()  function name results in erroneous view being created.
mysql-test/r/view.result:
  Test case for bug #12298 Typo in timestampdiff() function name results in erroneous view being created.
2005-08-12 22:42:50 +04:00
unknown
6161e19708 WL#2486
Disabled one test case because it is still a problem due to the fix for WL#2486.
Pushed to enable code review.


mysql-test/r/join.result:
  Disabled one test case because it is still a problem due to the fix for WL#2486.
  Pushed to enable code review.
2005-08-12 20:10:24 +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
8685497a3f Merge mysql.com:/usr/home/bar/mysql-4.1.b12351
into  mysql.com:/usr/home/bar/mysql-5.0


client/mysqlcheck.c:
  Auto merged
mysql-test/r/func_system.result:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2005-08-12 17:10:00 +05:00
unknown
058d5bff6e Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b12351


sql/item_strfunc.cc:
  Auto merged
2005-08-12 15:44:03 +05:00
unknown
bd13f197ed Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2005-08-12 01:33:45 -07:00
unknown
8282261289 sql_base.cc:
Fixed bug #12470.
  A misplaced initialization of the cond_count counter
  resulted in a wrong calculation of it. This caused a memory
  corruption since this counter was used as a parameter of
  some memory allocation.
view.test:
  Added a test case for bug #12470.


mysql-test/t/view.test:
  Added a test case for bug #12470.
sql/sql_base.cc:
  Fixed bug #12470.
  A misplaced initialization of the cond_count counter
  resulted in a wrong calculation of it. This caused a memory
  corruption since this counter was used as a parameter of
  some memory allocation.
2005-08-12 01:27:04 -07:00
unknown
7eebb75132 Add SLEEP(seconds) function, which always returns 0 after the given
number of seconds (which can include microseconds). (Bug #6760)


mysql-test/r/func_misc.result:
  Add new results
mysql-test/t/func_misc.test:
  Add new regression test.
sql/item_create.cc:
  Add create_func_sleep()
sql/item_create.h:
  Add create_func_sleep()
sql/item_func.cc:
  Add sleep() implementation
sql/item_func.h:
  Add class for sleep() function
sql/lex.h:
  Handle SLEEP() function
2005-08-11 18:58:22 -07:00
unknown
e0607f0a83 Avoid spurious error when restoring INFORMATION_SCHEMA as the current
database after failing to execute a stored procedure in an inaccessible
database. (Bug #12318)


mysql-test/r/sp-security.result:
  Update results
mysql-test/t/sp-security.test:
  Add regression test
sql/mysql_priv.h:
  Add additional argument to mysql_change_db()
sql/sp.cc:
  Use mysql_change_db(), get rid of sp_change_db().
sql/sp.h:
  Get rid of sp_change_db().
sql/sql_db.cc:
  Handle no_access_check flag to mysql_change_db, and remove the send_ok()
  call.
sql/sql_parse.cc:
  Add extra argument to mysql_change_db(), and call send_ok() after
  successful calls to same (since it no longer does it for us).
2005-08-11 17:04:16 -07:00
unknown
743fde2404 sql_base.cc:
Fixed bug #12382.
  INSERT statement effectively changed thd->set_query_id to 0,
  while SELECT statement changed it to 0. As a result
  the insert_fields function that expanded '*' was called
  with different values of thd->set_query_id for the query
  SELECT * FROM view depending on whether it was run after
  an INSERT or after a SELECT statement. This was corrected
  by restoring the old value of thd->set_query_id when
  returning from the function setup_fields where possible
  reset could occur.
  If the value of thd->set_query_id == 0 then the fields
  substituted instead of '*' were not registered as used
  for bitmaps used_keys. This caused selection of an invalid
  execution plan for the query SELECT * from <view>.
view.result, view.test:
  Added a test case for bug #12382.


mysql-test/t/view.test:
  Added a test case for bug #12382.
mysql-test/r/view.result:
  Added a test case for bug #12382.
sql/sql_base.cc:
  Fixed bug #12382.
  INSERT statement effectively changed thd->set_query_id to 0,
  while SELECT statement changed it to 0. As a result
  the insert_fields function that expanded '*' was called
  with different values of thd->set_query_id for the query
  SELECT * FROM view depending on whether it was run after
  an INSERT or after a SELECT statement. This was corrected
  by restoring the old value of thd->set_query_id when
  returning from the function setup_fields where possible
  reset could occur.
  If the value of thd->set_query_id == 0 then the fields
  substituted instead of '*' were not registered as used
  for bitmaps used_keys. This caused selection of an invalid
  execution plan for the query SELECT * from <view>.
2005-08-11 16:10:34 -07:00
unknown
04e2ca68ff Merge mysql.com:/home/jimw/my/mysql-5.0-12457
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-11 14:35:01 -07:00
unknown
a6975c017b fix after merge
mysql-test/r/bigint.result:
  fix test after merge
mysql-test/r/query_cache.result:
  fix test after merge
mysql-test/r/type_datetime.result:
  fix test after merge
2005-08-11 18:42:22 +01:00
unknown
de00ff7626 Merge xiphis.org:/usr/home/antony/work2/mysql-4.1
into  xiphis.org:/usr/home/antony/work2/merge-5.0


client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
myisam/ft_boolean_search.c:
  Auto merged
myisammrg/myrg_static.c:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/rpl_drop_temp.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/bigint.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/rpl_drop_temp.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
include/my_sys.h:
  manual merge 4.1->5.0
mysql-test/r/bigint.result:
  manual merge 4.1->5.0
mysql-test/r/subselect.result:
  manual merge 4.1->5.0
mysql-test/t/subselect.test:
  manual merge 4.1->5.0
mysys/charset.c:
  manual merge 4.1->5.0
sql/ha_ndbcluster.cc:
  manual merge 4.1->5.0
sql/item_strfunc.cc:
  manual merge 4.1->5.0
sql/sql_base.cc:
  manual merge 4.1->5.0
sql/sql_select.cc:
  manual merge 4.1->5.0
sql/sql_union.cc:
  manual merge 4.1->5.0
strings/Makefile.am:
  manual merge 4.1->5.0
tests/mysql_client_test.c:
  manual merge 4.1->5.0
2005-08-11 12:18:53 +01:00
unknown
bf07693148 query_cache_notembedded.test, query_cache_notembedded.result:
postmerge fix


mysql-test/r/query_cache_notembedded.result:
  postmerge fix
mysql-test/t/query_cache_notembedded.test:
  postmerge fix
2005-08-11 13:07:08 +03:00
unknown
98da6d5ffb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg11973-2


sql/item_subselect.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
mysql-test/r/trigger.result:
  SCCS merged
mysql-test/t/trigger.test:
  SCCS merged
2005-08-11 10:39:33 +04:00
unknown
c1a7cfb7d5 Fix mysql_info() returning bad data in the results of a multi-statement
query that mixed statements that do and do not return info. (Bug #11688)


mysql-test/r/metadata.result:
  Add new results
mysql-test/t/metadata.test:
  Add new regression test
sql-common/client.c:
  Clear mysql->info in free_old_query()
2005-08-10 18:32:17 -07:00
unknown
5329be868e Merge xiphis.org:/usr/home/antony/work2/p2-bug10109.3
into  xiphis.org:/usr/home/antony/work2/p2-bug10109.4


mysql-test/t/insert_update.test:
  Auto merged
mysql-test/r/insert_update.result:
  Auto merged
sql/sql_class.h:
  discard bug10109 changes from 4.1
sql/sql_insert.cc:
  merge bug10109 from 4.1 to 5.0
sql/sql_parse.cc:
  discard bug10109 changes from 4.1
2005-08-10 22:17:53 +01:00
unknown
42fec6b68b Merge mysql.com:/home/psergey/mysql-5.0-bug12228-r4
into mysql.com:/home/psergey/mysql-5.0-bug12228-r5


mysql-test/r/type_bit.result:
  Auto merged
mysql-test/t/sp-threads.test:
  Auto merged
mysql-test/t/type_bit.test:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
2005-08-10 21:17:52 +00:00
unknown
6b9ec78be0 BUG#12228: Post review fixes: Added test case, code cleanup.
mysql-test/r/sp-threads.result:
  Testcase for BUG#12228
mysql-test/t/sp-threads.test:
  Testcase for BUG#12228
sql/sp_cache.cc:
  BUG#12228: Post-review fixes: small code cleanup
sql/sp_cache.h:
  BUG#12228: Post-review fixes: fixed the comment
sql/sql_parse.cc:
  BUG#12228: Post-review fixes: in mysql_parse, flush obsolete SPs from the caches only if 
   the query hasn't been handled by the query cache.
sql/sql_prepare.cc:
  BUG#12228: Post-review fixes: in mysql_stmt_prepare/execute, flush SP caches 
   "closer to the execution"
2005-08-10 21:17:02 +00:00
unknown
0014d5f5a3 Fix rpl_openssl test to actually work. (Bug #12457, Bug #10860)
mysql-test/r/rpl_openssl.result:
  Update results
mysql-test/t/rpl_openssl.test:
  Test whether server has SSL support, not whether the client is using SSL.
  Use 'localhost' in user we create to avoid problems with anonymous user.
2005-08-10 13:30:53 -07:00
unknown
e66cd71698 Fix bug #11864 non unique names are allowed in subquery
Column names weren't checked for uniqueness for subqueries.

Code for names uniqueness checking used for view creation moved into 
separate function named check_duplicate_names(). It's called on 
preparation of subqueries to check uniqueness of names. If duplicate names 
are found then error is raised.


sql/sql_derived.cc:
  Fix bug #11864 non unique names are allowed in subquery
  Added check for names uniqueness in select list.
sql/sql_view.cc:
  Fix bug #11864 non unique names are allowed in subquery
  Code for checking uniqueness of names in item list moved into separate function to make in available for use from other places.
sql/sql_view.h:
   Fix bug #11864 non unique names are allowed in subquery
  Added check_duplicate_names() function prototype.
mysql-test/t/derived.test:
  Fixed test case results after bug fix #11864
  Added test case for bug#11864 non unique names are allowed in subquery.
mysql-test/t/select_safe.test:
  Fixed test case results after bug fix #11864
mysql-test/r/derived.result:
  Added test case for bug #11864 non unique names are allowed in subquery.
  Fixed test case results after bug fix #11864
mysql-test/r/select_safe.result:
  Fixed test case results after bug fix #11864
2005-08-10 17:45:00 +04:00
unknown
6cca9a0fd3 Fix for bug #10499 (Function creation with GEOMETRY return)
mysql-test/r/gis.result:
  test result fixed
mysql-test/t/gis.test:
  test case
sql/sp_head.cc:
  m_geom_returns is sent to make_field
sql/sp_head.h:
  m_geom_returns declared
sql/sql_yacc.yy:
  m_geom_returns initializing added
2005-08-10 13:45:05 +05:00
unknown
8559ef627d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg12280


sql/sql_parse.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
2005-08-10 10:32:43 +04:00
unknown
f6fff55eb0 Fix for bug #12280 "Triggers: crash if flush tables".
We should not allow FLUSH statement to be executed inside both triggers
and stored functions.


mysql-test/r/sp-error.result:
  Updated test after replacing error, which is thrown when one uses FLUSH
  statement inside of stored function, with more specific.
  Also now we issue more general error when we barking about USE command
  in stored routines.
mysql-test/r/trigger.result:
  Added test for bug #12280 "Triggers: crash if flush tables"
mysql-test/t/sp-error.test:
  Updated test after replacing error, which is thrown when one uses FLUSH
  statement inside of stored function, with more specific.
  Also now we issue more general error when we barking about USE command
  in stored routines.
mysql-test/t/trigger.test:
  Added test for bug #12280 "Triggers: crash if flush tables"
sql/share/errmsg.txt:
  Removed ER_SP_NO_USE error. Now we use more general ER_SP_BADSTATEMENT in this
  case. Instead added error message for barking about statements which should not
  be allowed inside of stored functions or triggers.
  It is safe to do this since it is highly unprobable that someone will upgrade
  first to the new 5.0 release and then downgrade back to the old one.
sql/sql_parse.cc:
  reload_acl_and_cache():
    FLUSH TABLES and FLUSH PRIVILEGES should not be allowed if we are inside
    of stored function or trigger.
sql/sql_yacc.yy:
  We should not allow FLUSH statement inside both triggers and stored
  functions. Replaced error which is thrown in this case with more
  specific.
  Also now we issue more general ER_SP_BADSTATEMENT error when one tries
  to use USE command inside of stored routine.
2005-08-10 10:31:32 +04:00
unknown
61a68ed6fa Clumsy but working fix for bug #11973 "SELECT .. INTO var_name; in trigger
cause crash on update".

Let us update "thd" pointer in LEX, all its units and in LEX::result before
executing statement in trigger body, since triggers are associated with TABLE
object and because of this can be used in different threads.


mysql-test/r/trigger.result:
  Added test case for bug #11973 "SELECT .. INTO var_name; in trigger cause
  crash on update".
mysql-test/t/trigger.test:
  Added test case for bug #11973 "SELECT .. INTO var_name; in trigger cause
  crash on update".
sql/item_subselect.cc:
  subselect_engine:
    Moved implementation of set_thd() method to item_subselect.cc,
    since now it also sets "thd" for subselect_engine::result.
sql/item_subselect.h:
  subselect_engine:
    Moved implementation of set_thd() method to item_subselect.cc,
    since now it also sets "thd" for subselect_engine::result.
sql/sql_class.h:
  select_result:
    Added set_thd() method for updating select_result::thd value (we need this
    in cases when statement to which this select_result belongs will be used
    in different threads, as it happens for statements in trigger body).
  multi_delete/multi_update:
    Got rid of redundant "thd" member (we already have it in select_result).
sql/sql_delete.cc:
  multi_delete:
    Got rid of redundant "thd" member (we already have it in select_result).
sql/sql_lex.h:
  st_select_lex_unit:
    Added set_thd() method for updating st_select_lex_unit::thd value
    (we need this in cases when statement to which this unit belongs will
     be used in different threads, as it happens for statements in trigger body).
    We don't update thd of select_result pointed by st_select_lex_unit::result
    in this method, since it is either have too short lifetime (i.e. created for
    each execution) or is accessible via Item_subquery or LEX::result and thus
    already taken care of.
sql/sql_parse.cc:
  multi_delete:
    Got rid of redundant "thd" member (we already have it in select_result).
sql/sql_prepare.cc:
  reinit_stmt_before_use():
    We have to update "thd" pointer in LEX, all its units and in LEX::result,
    since statements which belong to trigger body are associated with TABLE
    object and because of this can be used in different threads.
sql/sql_update.cc:
  multi_update:
    Got rid of redundant "thd" member (we already have it in select_result).
2005-08-10 00:23:56 +04:00
unknown
d2c97cdee0 Fix 'source' command in mysql client to handle delimiter command
in sourced file properly. (Bug #11523)


client/mysql.cc:
  Rename read_lines() to read_and_execute() and change interface so it
  is clear when we are reading and processing lines interactively versus
  in batch mode or from a file being sourced.
mysql-test/r/mysql.result:
  Add results
mysql-test/t/mysql_delimiter.sql:
  Add new test
mysql-test/t/mysql_delimiter_source.sql:
  New BitKeeper file ``mysql-test/t/mysql_delimiter_source.sql''
2005-08-09 12:17:28 -07:00
unknown
71a8b11ff2 Fix bug #12340 Wrong comparison in ha_innobase::cmp_ref()
When PRIMARY KEY is present ha_innobase::cmp_ref() uses it to compare refs.
After comparing part of key it moves pointers to compare next part.
For varchar parts pointers were moved only by length of parts, not including
bytes containig part length itself. This results in wrong comparision and
wrong number of deleted records.



sql/ha_innodb.cc:
  Fix bug #12340  ha_innobase::cmp_ref() moves pointers by wrong length.
mysql-test/t/innodb.test:
  Test case for bug #12340 ha_innobase::cmp_ref() moves pointers by wrong length.
mysql-test/r/innodb.result:
  Test case for bug #12340 ha_innobase::cmp_ref() moves pointers by wrong length.
2005-08-09 22:05:07 +04:00
unknown
e088a69901 Fix for bug #9465 (check table extended fails with SPATIAL)
myisam/mi_check.c:
  different search function is used for SPATIAL keys
mysql-test/r/gis-rtree.result:
  test result fixed
mysql-test/t/gis-rtree.test:
  test case
2005-08-09 21:30:28 +05:00
unknown
888a931432 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-4.1
into  xiphis.org:/usr/home/antony/work2/p2-bug10109.3


sql/sql_parse.cc:
  Auto merged
2005-08-09 16:35:51 +01:00
unknown
8e06296272 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-is
2005-08-09 12:57:50 +04:00
unknown
c4228519a6 Fixed test that failed on 32 bit systems
sql/ha_innodb.cc:
  Don't print not critical warning if log_warnings is not set
  Use sql_print_warning() instead of fprintf().
  (We should not use fprintf() as this causes problems on windows and with the embedded server)
2005-08-09 11:21:45 +03:00
unknown
8103db27bb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-is


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
mysql-test/r/sp.result:
  Manual merge
mysql-test/t/sp.test:
  Manual merge
sql/sql_class.h:
  Manual merge
2005-08-09 11:43:55 +04:00
unknown
310bb7e2da Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0


mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
2005-08-08 16:55:29 -07:00
unknown
6f0a626097 subselect.test, subselect.result:
Added a test case for bug #12392.
item_cmpfunc.cc:
  Fixed bug #12392.
  Missing handling of rows containing NULL components
  when evaluating IN predicates caused a crash.


sql/item_cmpfunc.cc:
  Fixed bug #12392.
  Missing handling of rows containing NULL components
  when evaluating IN predicates caused a crash.
mysql-test/r/subselect.result:
  Added a test case for bug #12392.
mysql-test/t/subselect.test:
  Added a test case for bug #12392.
2005-08-08 16:51:12 -07:00
unknown
502e97f875 Fix for BUG#12228: SP cache code:
* Cleanup SP Cache code, now SP Cache only deletes sp_head objects in 
  sp_cache_flush_obsolete() invalidates all pointers to routines in the cache.
* Use new SP Cache use contract in the code.

There is no test case because it doesn't seem to be possible to cause thread races to end
the same way they end in heavy-load test. This patch removes the crash in heavy test.


mysql-test/r/type_bit.result:
  Drop the tables this test tries to create
mysql-test/r/view.result:
  Drop function this test creates
mysql-test/t/type_bit.test:
  Drop the tables this test tries to create
mysql-test/t/view.test:
  Drop function this test creates
sql/sp.cc:
  Fix for BUG#12228: When a routine is deleted/modified, invalidate all cached SPs in all
  threads. We need to do so because sp_lex_keeper::{prelocking_tables, query_tables_own_last}
  in one SP may depend on another SP sp_lex_keeper::m_lex is using.
sql/sp_cache.cc:
  Fix for BUG#12228:
  * Move class sp_cache to here from sp_cache.h, document the functions.
  * sp_cache_insert, sp_cache_remove, sp_cache_invalidate and sp_cache_lookup must not delete
    sp_head* objects as they may be called during SP execution when sp_head objects are used.
  * Added sp_cache_flush_obsolete() function that may delete sp_head objects.
  * Removed sp_cache_remove as there is no need for it now - when we change one SP we should
    invalidate all other SPs, because sp_lex_keeper::{prelocking_tables, 
    query_tables_own_last} from one SP depend on content of another SP (used in 
    sp_lex_keeper::m_lex).
sql/sp_cache.h:
  Fix for BUG#12228:
  * Move class sp_cache to sp_cache.cc it is not needed in .h file
  * Added comments
sql/sql_parse.cc:
  Fix for BUG#12228: Call new sp_cache_flush_obsolete() function before running the query
sql/sql_prepare.cc:
  Fix for BUG#12228: Call new sp_cache_flush_obsolete() function before preparing/executing a PS
2005-08-08 23:23:34 +00:00
unknown
e6ed39b405 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/my/mysql-4.1
2005-08-09 00:15:27 +03:00
unknown
97988099eb Review of new pushed code
- Fixed some error condtion when handling dates with 'T'
- Added extra test for bug #11867 (Wrong result with "... WHERE ROW( a, b ) IN ( SELECT DISTINCT a, b WHERE ...)" to show it's not yet fixed
- Safety fixes and cleanups


mysql-test/r/subselect.result:
  Added extra test case to test case for bug #11867
  (Result shows that current code is not yet right and needs to be fixed)
mysql-test/r/type_datetime.result:
  More tests for dates of type CCYYMMDDTHHMMSS
mysql-test/t/subselect.test:
  Added extra test case to test case for bug #11867
mysql-test/t/type_datetime.test:
  More tests for dates of type CCYYMMDDTHHMMSS
sql-common/my_time.c:
  Fixed handling of dates of type CCYYMMDDTHHMMSS
  (Old code couldn't handle 2003-0304 or 2003-0003-02)
sql/slave.cc:
  Indentation cleanup
sql/sql_parse.cc:
  Added test of return value of get_system_var()
sql/sql_select.cc:
  Removed unnecessary call to field->table->maybe_null
sql/sql_union.cc:
  Indentation fixes
2005-08-09 00:13:49 +03:00
unknown
10805ec234 item_strfunc.cc:
BUG #11104 
      Took out the offset-=delimiter_length-1 out of the for loop. It was causing
      basically this: 
      select substring_index('the king of the the hill', 'the', -2) to not work.
      The first iteration, offset would be initialised to 24, then strstr would 
      point at 'the king of the the* hill' ('*'means right before the 
      character following), returning a offset of 16. The for loop would then 
      decrement offset by two (3 - 1), to 14, now pointing at 
      "the king of th*e the hill", _skipping_ past the 'e' in the second to last
      'the', and therefore strstr would never have a chance of matching the 
      second to last 'the', then moving on to the 'the' at the begginning of the 
      string!
      In a nutshell, offset was being decremented by too great a value, preventing
      the second to last 'the' from being ever found, hence the result of 
      'king of the the hill' from the query that is reported in the bug report
func_str.test:
  BUG #11104
  Added tests to make sure fix addresses issues in original bug report
func_str.result:
  BUG #11104 
  New results for new tests


mysql-test/r/func_str.result:
  BUG #11104 
  
  New results for new tests
mysql-test/t/func_str.test:
  BUG #11104
  
  Added tests to make sure fix addresses issues in original bug report
sql/item_strfunc.cc:
  BUG #11104 
      Took out the offset-=delimiter_length-1 out of the for loop. It was causing
      basically this: 
      select substring_index('the king of the the hill', 'the', -2) to not work.
      The first iteration, offset would be initialised to 24, then strstr would 
      point at 'the king of the the* hill' ('*'means right before the 
      character following), returning a offset of 16. The for loop would then 
      decrement offset by two (3 - 1), to 14, now pointing at 
      "the king of th*e the hill", _skipping_ past the 'e' in the second to last
      'the', and therefore strstr would never have a chance of matching the 
      second to last 'the', then moving on to the 'the' at the begginning of the 
      string!
  
      In a nutshell, offset was being decremented by too great a value, preventing
      the second to last 'the' from being ever found, hence the result of 
      'king of the the hill' from the query that is reported in the bug report
2005-08-08 13:46:13 -07: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
1f01817e09 Merge mysql.com:/home/jimw/my/mysql-5.0-6080
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/sql_parse.cc:
  Auto merged
sql/share/errmsg.txt:
  SCCS merged
2005-08-08 10:12:24 -07:00
unknown
279846b4be Merge mysql.com:/home/jimw/my/mysql-5.0-3094
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-08 10:10:04 -07:00
unknown
d3a6f4082f func_system.result, func_system.test:
adding test case
item_strfunc.cc:
  Bug#12351
  CONCAT with USER()/DATEBASE() and
  a column gets strange results.
  Mark created Item_str as constant, so CONCAT
  cannot reuse it for optimization purposes.


sql/item_strfunc.cc:
  Bug#12351
  CONCAT with USER()/DATEBASE() and
  a column gets strange results
mysql-test/t/func_system.test:
  adding test case
mysql-test/r/func_system.result:
  adding test case
2005-08-08 19:09:54 +05:00
unknown
f4e065916e grant.result:
After merge fix


mysql-test/r/grant.result:
  After merge fix
  ,
2005-08-08 19:04:11 +05:00
unknown
39fda60043 Fix for bug #10055 "Using stored function with information_schema causes empty
result set".

To enable full access to contents of I_S tables from stored functions
or statements that use them, we manipulate with thread's open tables
state and ensure that we won't cause deadlock when we open tables by
ignoring flushes and name-locks.
Building of contents of I_S.TABLES no longer requires locking of tables
since we use use handler::info() method with HA_STATUS_AUTO flag instead
of handler::update_auto_increment() for obtaining information about
auto-increment values. But this also means that handlers have to implement
support for HA_STATUS_AUTO flag (particularly InnoDB needs it).


mysql-test/r/alter_table.result:
  Updated test results. This change was caused by the fact that now when
  we build contents of I_S tables (and thus output of SHOW INDEX) we
  don't use instances of tables which may be already opened and locked
  by thread (we always use new instance).
mysql-test/r/information_schema.result:
  Added test which checks how information about current auto-increment value for
  table is reported in INFORMATION_SCHEMA.TABLES view.
mysql-test/r/sp.result:
  Added test for bug #10055 "Using stored function with information_schema causes
  empty result set".
mysql-test/t/information_schema.test:
  Added test which checks how information about current auto-increment value for
  table is reported in INFORMATION_SCHEMA.TABLES view.
mysql-test/t/sp.test:
  Added test for bug #10055 "Using stored function with information_schema causes
  empty result set".
sql/mysql_priv.h:
  close_thread_tables():
    Get rid of 'stopper' argument which is no longer used. Now when we need
    to open and then close some table without touching tables which are already
    opened we use THD::reset_n/restore_backup_open_tables_state() methods.
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
sql/sp.cc:
  close_proc_table/open_proc_table_for_read/db_find_routine():
    Replaced push_open_tables_state/pop_open_tables_state() methods which
    were saving/restoring current open tables state in/from THD::open_state_list
    with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
    methods which assume that backup storage for this state is allocated on
    stack (or elsewhere) by their caller.
  open_proc_table_for_read():
    Since now we can have several open tables states stacked up we can't rely
    rely on checking whether we have some tables open in previous state.
    Instead we always assume that some tables are open and we need to ignore
    flush while locking mysql.proc. We don't really need 
    MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK in this case since we open mysql.proc table
    only for reading.
sql/sp.h:
  Added declarations of open_proc_table_for_read()/close_proc_table() to be
  able to use them in sql_show.cc.
sql/sql_base.cc:
  close_thread_tables():
    Get rid of 'stopper' argument which is no longer used. Now when we need
    to open and then close some table without touching tables which are already
    opened we use THD::reset_n/restore_backup_open_tables_state() methods.
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
sql/sql_class.cc:
  Open_tables_state, THD:
    Replaced push_open_tables_state/pop_open_tables_state() methods which
    were saving/restoring current open tables state in/from THD::open_state_list
    with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
    methods which assume that backup storage for this state is allocated on
    stack (or elsewhere) by their caller.
sql/sql_class.h:
  Open_tables_state, THD:
    Replaced push_open_tables_state/pop_open_tables_state() methods which
    were saving/restoring current open tables state in/from THD::open_state_list
    with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
    methods which assume that backup storage for this state is allocated on
    stack (or elsewhere) by their caller.
sql/sql_handler.cc:
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
sql/sql_prepare.cc:
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
sql/sql_show.cc:
  get_all_tables():
    Now we use THD::reset_n_/restore_backup_open_tables_state() for 
    saving/restoring open tables state instead of working with it directly
    (This also allows us to have proper content of I_S system tables in
    statements with stored functions and in stored functions). We also
    ignore possible flushes when opening tables (we may create deadlock
    otherwise). Also we do all needed manipulations with LEX in this function
    and not in get_schema_tables_result() now.
  get_schema_tables_record():
    Let us use handler::info() method with HA_STATUS_AUTO flag for obtaining
    information about table's auto-increment value. This allows to avoid locking
    of tables which is needed when we use handler::update_auto_increment() method.
  fill_schema_proc():
    Now we use open_proc_table_for_read/close_proc_table() for access to
    mysql.proc table (so we won't cause deadlock if we already have some
    tables open and locked, this also allows us to have proper content in
    ROUTINES system table in statements using stored functions/in stored
    functions).
  get_schema_tables_result():
    Moved all manipulations with Open_tables_state and LEX needed for
    safe opening of tables to ST_SCHEMA_TABLE::fill_table functions
    (i.e. get_all_tables() and fill_schema_proc()).
sql/sql_update.cc:
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
2005-08-08 17:46:06 +04:00
unknown
e630100374 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b10892
2005-08-08 17:49:13 +05:00
unknown
00267b9f73 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b10892
2005-08-08 16:22:17 +05:00
unknown
00e7404821 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mishka.local:/home/my/mysql-4.1
2005-08-08 13:19:13 +03:00
unknown
38b4ccf5d3 Fix for BUG #11642: [Patch]es x86 Assembler and text relocations
Changed assembler functions to not access global variables or variables in text segement
Added wrapper function in C to longlong2str() to pass _dig_vec_upper as an argument


mysql-test/r/bigint.result:
  More tests for parsing of bigint's
  More tests for different values to conv()
mysql-test/t/bigint.test:
  More tests for parsing of bigint's
  More tests for different values to conv()
strings/Makefile.am:
  Added longlong2str_asm.c
strings/longlong2str-x86.s:
  Changed functions to not access variables in text segment
  Fixed this by adding global variable '_dig_vec_upper' as an argument to longlong2str_with_dig_vector()
strings/my_strtoll10-x86.s:
  Removd array lfactor by calculating the value in code
  (this is to to make the code position independent)
strings/longlong2str_asm.c:
  New BitKeeper file ``strings/longlong2str_asm.c''
2005-08-08 13:18:18 +03:00
unknown
22a7308481 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/my/mysql-4.1
2005-08-08 13:14:29 +03:00
unknown
cfb8abd6cc Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into rurik.mysql.com:/home/igor/mysql-5.0
2005-08-07 15:56:48 -07:00
unknown
9de04d2ea9 Merge mysql.com:/home/mydev/mysql-4.1-4100
into  mysql.com:/home/mydev/mysql-5.0-5000


mysql-test/r/flush.result:
  Auto merged
mysql-test/t/flush.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-08-08 00:10:07 +02:00
unknown
a217d5c516 subselect.result:
Correction after manual merge.


mysql-test/r/subselect.result:
  Correction after manual merge.
2005-08-07 15:10:07 -07:00
unknown
84051f2a6d Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-5000
2005-08-08 00:10:06 +02:00
unknown
89e421cdb0 Manual merge 2005-08-07 15:10:06 -07:00
unknown
44b76f173d Post-merge fixes 2005-08-07 22:10:05 +00:00
unknown
7ca7da411e Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug11869-part3


BitKeeper/deleted/.del-not_windows.inc:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/rpl_flush_tables.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
2005-08-07 21:32:26 +00:00
unknown
f34d542c68 Manual merge
BitKeeper/deleted/.del-not_windows.inc:
  Delete: mysql-test/include/not_windows.inc
mysql-test/r/fulltext_order_by.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/fulltext_order_by.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/rpl_flush_tables.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/sql_union.cc:
  Auto merged
2005-08-07 21:30:46 +00:00
unknown
d7086c4a0c BUG#11869:part 2: post-review fixes: merging into 5.0
We're out of bits in st_select_lex->options so make TMP_TABLE_FORCE_MYISAM ==
OPTION_FOUND_COMMENT (the latter is not used by create_tmp_table).


mysql-test/r/create.result:
  Updated the test result
mysql-test/r/fulltext_order_by.result:
  Drop all tables this test uses
mysql-test/t/fulltext_order_by.test:
  Drop all tables this test uses
2005-08-07 21:21:30 +00:00
unknown
23095e278b Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into rurik.mysql.com:/home/igor/mysql-4.1
2005-08-07 14:03:47 -07:00
unknown
25201f23c8 Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-4100
2005-08-07 23:03:46 +02:00
unknown
84d34d9d59 subselect.result:
Added test case for bug #11867.
  Fixed results for two existing test cases.
subselect.test:
  Added test case for bug #11867.
item_subselect.cc:
  Fixed bug #11867.
  Added missing code in Item_in_subselect::row_value_transformer
  that caused problems for queries with
  ROW(elems) IN (SELECT DISTINCT cols FROM ...).


sql/item_subselect.cc:
  Fixed bug #11867.
  Added missing code in Item_in_subselect::row_value_transformer
  that caused problems for queries with
  ROW(elems) IN (SELECT DISTINCT cols FROM ...).
mysql-test/t/subselect.test:
  Added test case for bug #11867.
mysql-test/r/subselect.result:
  Added test case for bug #11867.
  Fixed results for two existing test cases.
2005-08-07 14:03:46 -07:00
unknown
b9e04cf1ef BUG#11869: part2: post-review fixes:
In init_prepare_fake_select_lex() don't empty ftfunc_list. UNION's ORDER BY clause may 
contain MATCH(...), for which fix_index() should be called.


mysql-test/r/fulltext_order_by.result:
  BUG#11869 part2 : added another test case
mysql-test/t/fulltext_order_by.test:
  BUG#11869 part2 : added another test case
2005-08-07 21:03:45 +00:00
unknown
9e5c20f31f Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
Give the user a warning if he tries to destroy the default key cache.


mysql-test/r/key_cache.result:
  Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
  The test result.
mysql-test/t/key_cache.test:
  Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
  The test case.
sql/share/errmsg.txt:
  Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
  The new message string.
2005-08-07 20:39:17 +02:00
unknown
1ab80cf4df Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-4100
2005-08-07 18:28:08 +02:00
unknown
1b431c4274 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug11869-part2
2005-08-07 11:05:25 +00:00
unknown
f3ce475dce Manual merge
mysql-test/t/fulltext_order_by.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
2005-08-07 11:03:54 +00:00
unknown
fdb4d307ab Bug#10109
"INSERT .. SELECT ... ON DUPLICATE KEY UPDATE fails"
  Ensure that check_insert_fields() is only called once when
  doing an INSERT..SELECT


mysql-test/r/insert_update.result:
  Test for bug 10109
mysql-test/t/insert_update.test:
  Test for bug 10109
sql/sql_class.h:
  select_insert needs more state
sql/sql_insert.cc:
  ensure that check_insert_fields() is only called once when
  doing an INSERT...SELECT
sql/sql_parse.cc:
  more args for select_insert constructor
2005-08-07 03:16:15 +01:00
unknown
852dcb7597 BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error):
When creating temporary table for UNION, pass TMP_TABLE_FORCE_MYISAM flag to 
create_tmp_table if we will be using fulltext function(s) when reading from the 
temp. table.


mysql-test/r/fulltext_order_by.result:
  Testcase for BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error)
mysql-test/t/fulltext_order_by.test:
  Testcase for BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error)
sql/mysql_priv.h:
  BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error):
  Added TMP_TABLE_FORCE_MYISAM flag
sql/sql_select.cc:
  BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error):
  In create_tmp_table(), honor the TMP_TABLE_FORCE_MYISAM flag
2005-08-06 21:08:28 +00:00
unknown
c03d28b893 Bug#12371 executing prepared statement fails (illegal mix of collations)
item.cc:
item.h:
  Adding Item_param::safe_charset_converter,
  not to return collation mix error if
  parameter can be converted into operation
  character set.

ctype_utf8.result:
  adding test case
ctype_utf8.test:
  adding test case


sql/item.h:
  Bug #12371 executing prepared statement fails (illegal mix of collations)
  Adding Item_param::safe_charset_converter,
  not to returm collation mix error if
  parameter can be converted into operation
  character set.
sql/item.cc:
  Bug #12371 executing prepared statement fails (illegal mix of collations)
mysql-test/t/ctype_utf8.test:
  adding test case
mysql-test/r/ctype_utf8.result:
  adding
2005-08-06 16:58:36 +05:00
unknown
c62a594200 Fix error message when creating a non-string field with a display
width beyond the maximum. (Bug #6080)


mysql-test/r/errors.result:
  Update results
mysql-test/r/type_bit.result:
  Update results
mysql-test/r/type_bit_innodb.result:
  Update results
mysql-test/t/errors.test:
  Add new regression test
mysql-test/t/type_bit_innodb.test:
  Update error code in test
sql/share/errmsg.txt:
  Add new error message
sql/sql_parse.cc:
  Display more appropriate error message for column creation that
  fails due to a non-string field with a display width that is too
  big.
2005-08-05 17:22:53 -07:00
unknown
4811f7bd1e mysql_priv.h:
Fixed bug #12154: a query returned: Column <name> cannot be null.
  The problem was due to a bug in the function setup_table_map:
  the flag maybe_null was set up incorrectly for inner tables of
  nested outer joins.
join_nested.result, join_nested.test:
  Added a test case for bug #12154.


mysql-test/t/join_nested.test:
  Added a test case for bug #12154.
mysql-test/r/join_nested.result:
  Added a test case for bug #12154.
sql/mysql_priv.h:
  Fixed bug #12154: a query returned: Column <name> cannot be null.
  The problem was due to a bug in the function setup_table_map:
  the flag maybe_null was set up incorrectly for inner tables of
  nested outer joins.
2005-08-05 16:43:35 -07:00
unknown
f82e2887bf Always report row type of 'Fixed' for MEMORY tables. (Bug #3094)
mysql-test/r/heap.result:
  Add new results
mysql-test/t/heap.test:
  Add new regression test
sql/ha_heap.h:
  Always report row type of Fixed for MEMORY tables
2005-08-05 13:19:48 -07:00
unknown
e13fa8ebbb testcase added to fix for bug #12281 (Geometry & trigger crash)
mysql-test/r/gis.result:
  test result fixed
mysql-test/t/gis.test:
  testcase added
2005-08-05 20:26:55 +05:00
unknown
2977a3a4b1 Bug#9459 - deadlock with flush with lock, and lock table write
Added a check before taking a global read lock if
the own thread has a write locked table.


mysql-test/r/flush.result:
  Bug#9459 - deadlock with flush with lock, and lock table write
  The test result.
mysql-test/t/flush.test:
  Bug#9459 - deadlock with flush with lock, and lock table write
  The test case.
2005-08-05 15:37:24 +02: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
b7ab93001d Fix out-of-order results in view results file
mysql-test/r/view.result:
  Update results file
2005-08-04 16:33:29 -07:00
unknown
86258948a2 Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-04 14:41:16 -07:00
unknown
01f1a3ac12 Update test results
mysql-test/r/create.result:
  Update error message text
mysql-test/r/query_cache.result:
  Update warnings
2005-08-04 14:38:48 -07:00
unknown
75c06af277 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/mysql-4.1-bug-12266
2005-08-05 01:03:21 +04:00
unknown
c5bcb9f01c Manual merge of #11335 bugfix
sql/item_sum.cc:
  Auto merged
mysql-test/r/view.result:
  Manual merge
mysql-test/t/view.test:
  Manual megre
sql/sql_select.cc:
  Manual merge
2005-08-05 00:34:42 +04:00
unknown
1f0c2ab3fc Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean


BitKeeper/deleted/.del-not_windows.inc:
  Delete: mysql-test/include/not_windows.inc
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/rpl_flush_tables.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
mysql-test/r/query_cache.result:
  Resolve conflict
2005-08-04 12:49:23 -07:00
unknown
1beb95e3e4 Update test to deal with more relaxed datetime parsing.
mysql-test/r/query_cache.result:
  Updated results
mysql-test/t/query_cache.test:
  Change test to use a truly invalid date, now that dates like 
  '20050327 0:0:0' are handled as they are in 4.0.
2005-08-04 12:45:32 -07:00
unknown
cd0f12b531 Merge mysql.com:/home/jimw/my/mysql-4.1-7308
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-08-04 10:48:53 -07:00
unknown
b2dc376afe Fix bug#12266 GROUP BY DATE(LEFT(column,8)) returns result strings with reduced
length.

When temporary field created for DATE(LEFT(column,8)) expression, max_length
value is taken from Item_date_typecast, and it is getting it from underlaid
Item_func_left and it's max_length is 8 in given expression. And all this
results in stripping last 2 digits.

To Item_date_typecast class added its own fix_length_and_dec() function 
that sets max_length value to 10, which is proper for DATE field.


mysql-test/t/group_by.test:
  Test case for bug#12266 GROUP BY DATE(LEFT(column,8)) returns result strings with reduced length.
mysql-test/r/group_by.result:
  Test case for bug#12266 GROUP BY DATE(LEFT(column,8)) returns result strings with reduced length.
sql/item_timefunc.h:
  Fix bug#12266 GROUP BY DATE(LEFT(column,8)) returns result strings with reduced length.
  To Item_date_typecast class added its own fix_length_and_dec() which sets proper max_length value.
2005-08-04 18:05:33 +04:00
unknown
0e72c2f109 Merge bk@192.168.21.1:/usr/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.clean
2005-08-04 18:24:18 +05:00
unknown
82f674f9e0 Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.clean
2005-08-04 18:22:53 +05:00
unknown
41212921bf Merge deer.(none):/home/hf/work/mysql-4.1.clean
into deer.(none):/home/hf/work/mysql-5.0.clean


mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
2005-08-04 16:36:14 +05:00
unknown
6b761d86fb Merge deer.(none):/home/hf/work/mysql-4.1.clean
into deer.(none):/home/hf/work/mysql-4.1.9508
2005-08-04 16:33:28 +05:00
unknown
999b0638b2 Merge deer.(none):/home/hf/work/mysql-4.1.clean
into deer.(none):/home/hf/work/mysql-4.1.11083


mysql-test/t/myisam.test:
  Auto merged
2005-08-04 16:30:36 +05:00
unknown
9e3562d773 grant.result, grant.test:
fixing tests accordingly
item.cc:
  Bug #10892 user variables not auto cast for comparisons
  When mixing strings with different character sets,
  and coercibility is the same, we allow conversion
  if one character set is superset for other character set.


sql/item.cc:
  Bug #10892 user variables not auto cast for comparisons
  When mixing strings with different character sets,
  and coercibility is the same, we allow conversion
  if one character set is superset for other character set.
mysql-test/t/grant.test:
  fixing tests accordingly
mysql-test/r/grant.result:
  fixing tests accordingly
2005-08-04 15:25:03 +05:00
unknown
ec657e8d2a patch for BUG#4680 - drop database breaking replication if there were extra files
in the database directory on the master


mysql-test/r/rpl_drop_db.result:
  New BitKeeper file ``mysql-test/r/rpl_drop_db.result''
mysql-test/t/rpl_drop_db.test:
  New BitKeeper file ``mysql-test/t/rpl_drop_db.test''
2005-08-03 18:08:20 -06:00
unknown
1d7479cdc4 Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-5.0
2005-08-04 02:07:53 +02:00
unknown
be22eacb3b Merge mysql.com:/Users/emurphy/src/bk-clean/mysql-4.1
into  mysql.com:/Users/emurphy/src/bk-clean/mysql-5.0
2005-08-03 16:15:05 -04:00
unknown
357ebcc284 BUG#12330 Adding updated result file which I missed in last changeset.
Adds --replace_column to make test results deterministic.


mysql-test/r/rpl_slave_status.result:
  BUG#12330 updated result file which I missed in last changeset
  This updates the test to use --replace_column to make the test
  deterministic.
2005-08-03 16:12:06 -04:00
unknown
acc4238654 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-11934
2005-08-03 14:14:02 +04:00
unknown
3ca396cdd1 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-sp-no-lock-r7


sql/sp.cc:
  Auto merged
sql/sp.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-08-03 10:14:01 +00:00
unknown
3e84336fec Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-5.0
2005-08-03 07:36:06 +02:00
unknown
7c17339561 Fix for bug #6859 (after Sanja's review)
Added check which throws ER_WRONG_OBJECT error in case the .frm
doesn't contain a valid table type (e.g. view or trigger)


mysql-test/r/create.result:
  Added test case for bug #6859
mysql-test/t/create.test:
  Add testcase for bug #6850
2005-08-03 07:29:48 +02:00
unknown
e442059c0d Manual merge
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.h:
  Auto merged
2005-08-03 03:47:07 +00:00
unknown
b323667ffc Prelocking-free SPs, post-review fixes:
* Don't activate prelocking mode for evaluating procedure arguments when it is not necessary.
* Code structure simplification and cleanup.
* Cleanup in .test files


mysql-test/r/sp-prelocking.result:
  Prelocking-free SPs, post-review fixes:
  Added comment, s/testdb/mysqltest/, fixed a wrong test (error wasnt reported because of known bug in mysqltestrun)
mysql-test/r/sp-security.result:
  Don't drop the table we're not using.
mysql-test/r/sp.result:
  Prelocking-free SPs, post-review fixes:
  remove redundant "drop table if exists t3" statements
mysql-test/t/sp-prelocking.test:
  Prelocking-free SPs, post-review fixes:
  Added comment, s/testdb/mysqltest/, fixed a wrong test (error wasnt reported because of known bug in mysqltestrun)
mysql-test/t/sp-security.test:
  Don't drop the table we're not using.
mysql-test/t/sp.test:
  Prelocking-free SPs, post-review fixes:
  remove redundant "drop table if exists t3" statements
sql/sp.cc:
  New, better defined, sp_get_prelocking_info() function to get info about
    statement prelocking options
sql/sp.h:
  Prelocking-free SPs, post-review fixes: New, better defined, sp_get_prelocking_info() 
  function to get info about statement prelocking options
sql/sp_cache.h:
  Prelocking-free SPs, post-review fixes: Amended the comments
sql/sp_head.cc:
  Prelocking-free SPs, post-review fixes: Amend the comments, simplify the code that 
  attaches removes statement's prelocking tables.
sql/sql_base.cc:
  Prelocking-free SPs, post-review fixes:
  * Use a better defined sp_get_prelocking_info() function to get info about 
    statement prelocking options
  * Don't activate prelocked mode for evaluation of SP arguments that use tables 
    but don't need prelocking.
sql/sql_class.cc:
  Prelocking-free SPs, post-review fixes: Initialize THD members in the order they are declared.
2005-08-03 03:37:32 +00:00
unknown
ec9470b552 Update out-of-date test result
mysql-test/r/information_schema.result:
  Update test results
2005-08-02 18:27:05 -07:00
unknown
1ea0632e6c Merge mysql.com:/home/jimw/my/mysql-5.0-11602
into  mysql.com:/home/jimw/my/mysql-5.0-clean


client/mysqltest.c:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/share/errmsg.txt:
  Resolve conflict
2005-08-02 16:50:12 -07:00
unknown
31febd5459 Fix test to avoid spurious failure message. (Bug #11233)
mysql-test/t/information_schema.test:
  Stub out column in results that we don't care about, and may vary
mysql-test/r/information_schema.result:
  Update results
2005-08-02 16:50:10 -07:00
unknown
455ee425d1 Generate a warning/error when DATE_SUB/ADD() functions calculate a date
that is outside the acceptable date range. (Bug #10627)


mysql-test/r/func_date_add.result:
  Add new results
mysql-test/t/func_date_add.test:
  Add new regression test
sql/item_timefunc.cc:
  Add warning for error conditions in Item_date_add_interval::get_date()
sql/share/errmsg.txt:
  Add new error message
2005-08-02 15:28:09 -07:00
unknown
5792c4d162 Fix bug #11934 Two sequential FLUSH TABLES WITH READ LOCK hangs client
Bug was introduced by cset 1.1659.14.1. Before it server was silently
ignoring that lock can't be acquired because it already acquired.

This patch makes make_global_read_lock_block_commit() return without error
if lock already acquired.


mysql-test/t/flush_table.test:
  Test case for bug#11934 FLUSH TABLES WITH READ LOCK hangs client.
mysql-test/r/flush_table.result:
  Test case for bug#11934 FLUSH TABLES WITH READ LOCK hangs client.
sql/lock.cc:
  Fix bug #11934 Two sequential FLUSH TABLES WITH READ LOCK hangs client.
  Make make_global_read_lock_block_commit() return without error if lock already acquired.
2005-08-03 02:01:27 +04:00
unknown
d953bc7a64 Added a test case for BUG#10456
mysql-test/r/rpl_insert_select.result:
  New BitKeeper file ``mysql-test/r/rpl_insert_select.result''
2005-08-02 15:13:56 -06: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
7c7843a216 Manual merge
myisam/sort.c:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
mysql-test/t/fulltext.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
strings/ctype-big5.c:
  Auto merged
2005-08-02 12:09:49 -07:00
unknown
015165add5 Fix parsing of dates with 'T' between date and time, as in ISO-8601
date format. (Bug #7308)


mysql-test/r/type_datetime.result:
  Add new results
mysql-test/t/type_datetime.test:
  Add new test
sql-common/my_time.c:
  Fix handling of field_length for each field in date, especially
  for dates not in the internal_format.
2005-08-02 11:31:01 -07:00
unknown
49b8de7d84 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/svoj/devel/mysql/BUG12075/mysql-4.1
2005-08-02 14:28:30 +05:00
unknown
b9ccc653ea Fix for BUG#12075.
FULLTEXT non-functional for big5 strings


mysql-test/r/ctype_big5.result:
  Test case for BUG#12075.
mysql-test/t/ctype_big5.test:
  Test case for BUG#12075.
strings/ctype-big5.c:
  hack: (to be fixed properly later) all multi-byte sequences are considered isalpha() now
2005-08-02 14:27:52 +05:00
unknown
82a3e84524 Merge mysql.com:/home/svoj/devel/mysql/BUG11684/mysql-4.0
into  mysql.com:/home/svoj/devel/mysql/BUG11684/mysql-4.1


myisam/sort.c:
  Auto merged
mysql-test/r/fulltext.result:
  Manual merge.
mysql-test/t/fulltext.test:
  Manual merge.
2005-08-02 12:12:37 +05:00
unknown
451ec64db9 BUG#11684 fix.
Repair crashes mysql when table has fulltext index.


myisam/sort.c:
  Use static ft_buf instead of dynamic mergebuf. Latter could be NULL if record has long words.
mysql-test/r/fulltext.result:
  Test case for BUG#11684 - repair crashes mysql when table has fulltext index.
mysql-test/t/fulltext.test:
  Test case for BUG#11684 - repair crashes mysql when table has fulltext index.
2005-08-02 11:33:26 +05:00
unknown
421dd5f1c2 Fix two test results that were merged out-of-order.
mysql-test/r/func_math.result:
  Fix incorrect merge of test results
mysql-test/r/user_var.result:
  Fix incorrect merge
2005-08-01 19:21:56 -07:00
unknown
d083e4ac1b Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean


mysql-test/r/key_cache.result:
  Auto merged
mysql-test/r/ps_1general.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/r/func_math.result:
  Resolve conflicts
mysql-test/r/user_var.result:
  Resolve conflicts
mysql-test/t/func_math.test:
  Resolve conflicts
mysql-test/t/user_var.test:
  Resolve conflicts
sql/item_func.cc:
  Resolve conflicts
sql/sql_parse.cc:
  Resolve conflicts
2005-08-01 17:54:57 -07:00
unknown
dc6810ec5b Merge mysql.com:/home/jimw/my/mysql-4.1-11402
into  mysql.com:/home/jimw/my/mysql-4.1-clean


sql/item_func.cc:
  Auto merged
mysql-test/t/func_math.test:
  Resolve conflict
2005-08-01 17:11:49 -07:00
unknown
a69ca6dc99 Merge mysql.com:/home/jimw/my/mysql-4.1-10724
into  mysql.com:/home/jimw/my/mysql-4.1-clean


sql/item_func.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
mysql-test/t/user_var.test:
  Resolve conflict
2005-08-01 17:10:35 -07:00
unknown
8fc1e27fb7 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
2005-08-01 17:08:38 -07:00