Commit graph

29417 commits

Author SHA1 Message Date
unknown
1b45888854 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  mysql.com:/home/dlenev/mysql-5.0-bg17764


mysql-test/r/trigger.result:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2006-03-29 14:55:04 +04:00
unknown
1d166b1760 Proposed fix for bug #17764 "Trigger crashes MyISAM table"
A table with an on insert trigger was reported as crashed when the insert
was processed with bulk insert mode on (handler::start_bulk_insert).
The trigger was also selecting from the same table, and that caused
the "crash".
The same problem was present when an insert statement, which was processed
in bulk mode, also used a stored function that was reading the same table.

This fix disables bulk inserts if a statement uses functions or invokes
triggers. Implementing more granular checks will require much more code and
therefore can hardly be done in 5.0


mysql-test/r/trigger.result:
  Added test bug #17764 "Trigger crashes MyISAM table".
mysql-test/t/trigger.test:
  Added test bug #17764 "Trigger crashes MyISAM table".
sql/sql_insert.cc:
  We should not start bulk inserts for INSERT (or similar) statement if it uses
  functions or invokes triggers since they may access to the same table and
  therefore should not see its inconsistent state created by this optimization.
sql/sql_load.cc:
  We should not start bulk inserts for INSERT (or similar) statement if it uses
  functions or invokes triggers since they may access to the same table and
  therefore should not see its inconsistent state created by this optimization.
2006-03-29 14:53:00 +04:00
unknown
53595c7020 Merge mysql.com:/extern/mysql/bk/mysql-5.0-runtime
into  mysql.com:/extern/mysql/5.0/bug17015/mysql-5.0-runtime
2006-03-28 17:03:14 +02:00
unknown
c47405e2ed Removed forgotten comment line in sql_select.cc.
sql/sql_select.cc:
  Forgot to remove commented line in previous commit.
2006-03-28 16:05:06 +02:00
unknown
442383892e Merge mysql.com:/extern/mysql/bk/mysql-5.0-runtime
into  mysql.com:/extern/mysql/5.0/bug17015/mysql-5.0-runtime


mysql-test/r/sp-error.result:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
sql/field.h:
  Auto merged
sql/sp.cc:
  Auto merged
2006-03-28 15:08:17 +02:00
unknown
e550d6e7e3 Review fix for BUG#17015: Routine name truncation not an error
sql/field.h:
  Added new method to Field class: char_length()
sql/sp.cc:
  Use Field::char_length() to check number of characters in the name field.
2006-03-28 15:06:06 +02:00
unknown
9a139c3adb Merge mysql.com:/extern/mysql/bk/mysql-5.0-runtime
into  mysql.com:/extern/mysql/5.0/bug16474/mysql-5.0-runtime


mysql-test/t/sp.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/sp.result:
  Manual merge.
2006-03-28 14:18:47 +02:00
unknown
537ec1e6df Post review fixes for BUG#16474: SP crashed MySQL.
mysql-test/r/ps.result:
  Added test coverage for "order by" in prepared statements (related to BUG#16474).
mysql-test/r/sp.result:
  Added reference to test case for BUG#16474.
mysql-test/t/ps.test:
  Added test coverage for "order by" in prepared statements (related to BUG#16474).
mysql-test/t/sp.test:
  Added reference to test case for BUG#16474.
sql/sql_select.cc:
  Fixed comment and test for basic_const_item() instead of is_splocal().
2006-03-28 14:16:21 +02:00
unknown
1d73c16b87 A fix and a test case for Bug#15683 "crash, Function on nested
VIEWs, Prepared statement": we didn't mark the nested views
as 'prelockng placeholders' when building the prelocking list. 
This resulted in these views being processed (merged, materialized)
before they are actually used. 


mysql-test/r/sp-prelocking.result:
  Test results fixed (Bug#15683)
mysql-test/t/sp-prelocking.test:
  Add a test case for Bug#15683
sql/sql_view.cc:
  When initializing tables used in a view, inherite 
  its 'prelocking_placeholder' flag. This flag is set when we're 
  opening the view in order to build the prelocking list for a query.
  In this case we should only calculate the list to 
  prelock, and should not merge neither this view nor any of the 
  nested views, of there are any. The flag is used to indicate this 
  mode.
2006-03-28 15:06:29 +04:00
unknown
e4e2e5024a Fix for BUG#15921: DROP TRIGGER - can't be drop trigger created
in older version.

The problem is that TRN-files created in "old" versions contain
junk in trigger_table field, which is not acceptable in "new" versions.


sql/parse_file.cc:
  1. Made parse_escaped_string() available globally;
  2. Polishing: fixing the comments.
sql/parse_file.h:
  Made parse_escaped_string() available globally.
sql/sql_trigger.cc:
  1. Polishing
  2. Removed declaration of global handle_old_incorrect_sql_modes()
     since it is not used anymore.
  3. Added a hook to support invalid "trigger_table" field in TRN-file
     from old versions.
2006-03-28 01:01:51 +04:00
unknown
ce494285fc Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1-new
into mysql.com:/Users/kent/mysql/bk/mysql-5.0-new
2006-03-27 19:37:29 +02:00
unknown
53aadad668 mysql_config.sh:
We are not to control what malloc package others are to use, remove -lmtmalloc from --libs(_r), bug#18322


scripts/mysql_config.sh:
  We are not to control what malloc package others are to use, remove -lmtmalloc from --libs(_r), bug#18322
2006-03-27 19:25:25 +02:00
unknown
ab123657b2 Merge monty@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2006-03-27 15:23:16 +03:00
unknown
880b72d020 Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/space/pekka/ndb/version/my50
2006-03-27 13:31:33 +02:00
unknown
65cb0b51b8 ndb - bug#17380: Missing charset causes NDB Client to crash
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  check parseTableInfo return value to avoid coredump
  seen on solaris when charsets missing on client host
2006-03-27 13:16:53 +02:00
unknown
dc9441e3cf Merge monty@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2006-03-27 13:47:13 +03:00
unknown
5e59971773 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
2006-03-27 11:52:54 +02:00
unknown
b3230cc265 Test case for BUG#15102 : select distinct returns empty result, select count distinct > 0 (correct)
Reproduced in 5.0.16-nt. Tested to work in 5.0.20
  


mysql-test/r/group_min_max.result:
  Test case for BUG#15102 : select distinct returns empty result, select count distinct > 0 (correct)
    Reproduced in 5.0.16-nt. Tested to be fixed in 5.0.20
mysql-test/t/group_min_max.test:
  Test case for BUG#15102 : select distinct returns empty result, select count distinct > 0 (correct)
    Reproduced in 5.0.16-nt. Tested to be fixed in 5.0.20
2006-03-27 12:20:25 +03:00
unknown
8b1a1c6ccb Merge monty@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2006-03-27 12:07:59 +03:00
unknown
783780f1c9 Safer fix for Bug #18435 "5.0.19 libmysqlclient not ABI-compatible with 5.0.18"
This fixes the problem if someone is using struct MYSQL as part of another structure together with a shared
library


include/mysql.h:
  Safer fix for Bug #18435
sql-common/client.c:
  Safer fix for Bug #18435
2006-03-27 12:02:23 +03:00
unknown
d5ea29f42e Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
2006-03-27 10:43:37 +02:00
unknown
da1a6f58a6 Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1
2006-03-27 10:34:21 +02:00
unknown
de8997d6c8 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
2006-03-27 10:31:25 +02:00
unknown
f97e32b0b2 Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into  perch.ndb.mysql.com:/home/jonas/src/50-work


ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Auto merged
ndb/test/ndbapi/testNodeRestart.cpp:
  Auto merged
ndb/test/src/NdbBackup.cpp:
  Auto merged
ndb/test/src/NdbRestarts.cpp:
  Auto merged
2006-03-27 10:21:52 +02:00
unknown
2a00c51673 ndb - autotest
Change semantic on DumpStateOrd::CmvmiSetRestartOnErrorInsert()
    Called wo/ args it resets to value in configuration (previously it set to 1 if called wo/ args)


ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Change semantic on DumpStateOrd::CmvmiSetRestartOnErrorInsert
    Called wo/ args it resets to value in configuration (previously it set to 1 if called wo/ args)
ndb/test/ndbapi/testNodeRestart.cpp:
  Change semantic on DumpStateOrd::CmvmiSetRestartOnErrorInsert
    Called wo/ args it resets to value in configuration (previously it set to 1 if called wo/ args)
ndb/test/src/NdbBackup.cpp:
  Change semantic on DumpStateOrd::CmvmiSetRestartOnErrorInsert
    Called wo/ args it resets to value in configuration (previously it set to 1 if called wo/ args)
ndb/test/src/NdbRestarts.cpp:
  Change semantic on DumpStateOrd::CmvmiSetRestartOnErrorInsert
    Called wo/ args it resets to value in configuration (previously it set to 1 if called wo/ args)
2006-03-27 10:18:48 +02:00
unknown
273aa4899a added option for netware build
netware/BUILD/compile-netware-START:
  added option for netware builds
2006-03-26 21:19:43 -05:00
unknown
2a70440543 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2006-03-24 12:56:31 -08:00
unknown
c0579144d5 Fixed bug #17164.
If the WHERE condition of a query contained an ORed FALSE term
then the set of tables whose rows cannot serve for null complements
in outer joins was determined incorrectly. It resulted in blocking 
possible conversions of outer joins into joins for such queries.


mysql-test/r/join_outer.result:
  Added a test case for bug #17164.
mysql-test/t/join_outer.test:
  Added a test case for bug #17164.
2006-03-24 12:44:54 -08:00
unknown
bb7e682809 Follow-up for the fix for bug #18153 "ALTER/OPTIMIZE/REPAIR on transactional
tables corrupt triggers".

It turned out that we also have relied at certain places that
(new_table != table_name) were always true on Windows and for transactional
tables. Since our fix for the bug brakes this assumption we have to add new
flag to pass this information around.
This code needs to be refactored but I dare not to do this in 5.0.


sql/sql_table.cc:
  mysql_alter_table():
    Follow-up for the fix for bug #18153 "ALTER/OPTIMIZE/REPAIR on
    transactional tables corrupt triggers". It turned out that we also have
    relied at certain places that (new_table != table_name) were always true
    on Windows and for transactional tables. Since our fix for the bug brakes
    this assumption we have to add new flag to pass this information around.
    This code needs to be refactored but I dare not to do this in 5.0.
2006-03-24 22:46:33 +03:00
unknown
d29e9a204a Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
2006-03-24 18:52:31 +01:00
unknown
98dfa6a1eb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/mysql-5.0-bg18153
2006-03-24 16:46:37 +03:00
unknown
77a921691d Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0


mysql-test/lib/mtr_timer.pl:
  Auto merged
ndb/src/ndbapi/NdbTransaction.cpp:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
2006-03-24 14:21:45 +01:00
unknown
5d119bf62c Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-03-24 13:56:05 +01:00
unknown
0abaf88c89 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
2006-03-24 13:31:51 +01:00
unknown
c62de1d5a8 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/mysql-5.0-bg18153
2006-03-24 15:28:08 +03:00
unknown
a389ec0b1b Fix for bug #18153 "ALTER/OPTIMIZE/REPAIR on transactional tables corrupt
triggers".

Applying ALTER/OPTIMIZE/REPAIR TABLE statements to transactional table or to
table of any type on Windows caused disappearance of its triggers.
Bug was introduced in 5.0.19 by my fix for bug #13525 "Rename table does not
keep info of triggers" (see comment for sql_table.cc for more info).
.


mysql-test/r/trigger.result:
  Added test-case covering handling of triggers when one does ALTER TABLE which
  should move table to different database.
mysql-test/t/trigger.test:
  Added test-case covering handling of triggers when one does ALTER TABLE which
  should move table to different database.
sql/sql_table.cc:
  mysql_alter_table():
    Removal of strdup() which is no longer necessary allows us to preserve
    nice assumption that "(new_db != db || new_table != table_name) indicates
    that table will be renamed. So now we really can use this condition to
    avoid updating trigger definitions when table is not renamed.
    Note that we can't use (alter_info->flags & ALTER_RENAME) condition instead
    since it can be also true when we do "ALTER TABLE t1 RENAME TO t1".
sql/sql_trigger.cc:
  Table_triggers_list::change_table_name():
    Mentioned assumption that subject table is not renamed to itself in method
    description. Added DBUG_ASSERT() to catch wrong usage of this method.
mysql-test/r/trigger-trans.result:
  New BitKeeper file ``mysql-test/r/trigger-trans.result''
mysql-test/t/trigger-trans.test:
  New BitKeeper file ``mysql-test/t/trigger-trans.test''
2006-03-24 14:58:18 +03:00
unknown
7c8acd5931 Fix 'metaphon' function to correctly calculate the length of the returned string
sql/udf_example.cc:
  Calculate length of returned string correctly
2006-03-24 11:12:32 +01:00
unknown
72470a9828 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
2006-03-24 10:52:44 +01:00
unknown
cebcd28232 If doing write, then peeking is not needed 2006-03-24 10:45:00 +01:00
unknown
e1da710d5b Only run in libtool if running in valgrind.
Apparently libtool isn't properly setup on all our build hosts.


mysql-test/mysql-test-run.pl:
  Only run in libtool if running in valgrind.
2006-03-23 22:29:53 +01:00
unknown
74a7b9a5f5 Merge production:mysql-5.0
into  shellback.(none):/home/msvensson/mysql/mysql-5.0
2006-03-23 21:49:30 +01:00
unknown
636064c0ba Dump result to .log file at test failure
client/mysqltest.c:
  Dump accumulated result upuntil test failure into a <testname>.log file for later examination
mysql-test/lib/mtr_report.pl:
  Inform about the <testname>.log file's existence
2006-03-23 21:48:31 +01:00
unknown
2711b9d5de Remove DBUG print that looks at args[0] even if arg_count is 0 2006-03-23 21:45:00 +01:00
unknown
6662707f74 Fix type "enfif" -> "endif" 2006-03-23 20:59:23 +01:00
unknown
d19fe3871a Delete gdbinit file before writing to it
Concat type+idx to get a unique gdbinit filename
2006-03-23 20:05:09 +01:00
unknown
52c4dbd88b Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  shellback.(none):/home/msvensson/mysql/mysql-5.0


client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
2006-03-23 18:58:53 +01:00
unknown
145e4258e5 Merge
include/m_ctype.h:
  Auto merged
strings/ctype-bin.c:
  Auto merged
strings/ctype-euc_kr.c:
  Auto merged
strings/ctype-gb2312.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
include/config-win.h:
  SCCS merged
2006-03-23 17:41:53 +01:00
unknown
5aa14b9832 config-win.h:
If CYBOZU defined, set character sets etc


include/config-win.h:
  If CYBOZU defined, set character sets etc
2006-03-23 17:25:49 +01:00
unknown
4688ccf099 Remove unused option "verbose" 2006-03-23 16:41:29 +01:00
unknown
6a57f970be Moved "tmpdir" and 2vardor" to the documented flags and add some documentation 2006-03-23 16:39:51 +01:00