Commit graph

35417 commits

Author SHA1 Message Date
tomas@whalegate.ndb.mysql.com
6bab2f13b7 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
2007-03-22 05:44:39 +01:00
kostja@bodhi.local
c011a25f66 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime
2007-03-21 23:57:12 +03:00
tomas@whalegate.ndb.mysql.com
c01f31654b Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
2007-03-21 09:28:37 +01:00
jonas@perch.ndb.mysql.com
75e0f57e3e Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2007-03-21 09:06:14 +01:00
tomas@whalegate.ndb.mysql.com
37b8c96197 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-telco-gca
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
2007-03-21 09:00:38 +01:00
jonas@perch.ndb.mysql.com
7834bd5846 ndb - bug#27286 (5.0 version)
make sure master is sendable
2007-03-21 08:57:14 +01:00
tomas@whalegate.ndb.mysql.com
5682efdfcf Bug #26825 MySQL Server Crashes in high load
- initialize to NULL, to avoid call of free on uninitialized variable
2007-03-21 08:40:24 +01:00
jonas@perch.ndb.mysql.com
9ce7ad943b Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2007-03-20 16:26:51 +01:00
jonas@perch.ndb.mysql.com
844845c772 ndb - bug#27283 (wl2325-5.0)
Handle race condtition between MASTER_GCPCONF and execGCP_NODEFINISH
2007-03-20 16:16:25 +01:00
jonas@perch.ndb.mysql.com
7898079378 ndb - bug#27291
Fix correct min-value for LockPagesInMemory
2007-03-20 16:08:39 +01:00
tomas@whalegate.ndb.mysql.com
ac8592ce2c Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
2007-03-20 10:37:11 +01:00
evgen@moonbone.local
31b9145ab3 sql_insert.cc:
Removed wrong fix for the bug#27006.
  The bug was added by the fix for the bug#19978 and fixed by Monty on 2007/02/21.
trigger.test, trigger.result:
  Corrected test case for the bug#27006.
2007-03-20 00:46:19 +03:00
kostja@bodhi.local
a9065201d5 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime
2007-03-19 23:59:53 +03:00
evgen@moonbone.local
e84584e2e3 Bug#27006: AFTER UPDATE triggers not fired with INSERT ... ON DUPLICATE KEY
UPDATE if the row wasn't actually changed.

This bug was caused by fix for bug#19978. It causes AFTER UPDATE triggers
not firing if a row wasn't actually changed by the update part of the
INSERT .. ON DUPLICATE KEY UPDATE.

Now triggers are always fired if a row is touched by the INSERT ... ON
DUPLICATE KEY UPDATE.
2007-03-16 17:23:26 +03:00
gkodinov/kgeorge@magare.gmz
830c134e84 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B26261-5.0-opt
2007-03-16 10:50:33 +02:00
gkodinov/kgeorge@macbook.gmz
61d93679c3 Bug #26261:
INSERT uses query_id to verify what fields are
 mentioned in the fields list of the INSERT command.
 However the check for that is made after the 
 ON DUPLICATE KEY is processed. This causes all
 the fields mentioned in ON DUPLICATE KEY to be 
 considered as mentioned in the fields list of 
 INSERT.
 Moved the check up, right after processing the
 fields list.
2007-03-16 10:35:39 +02:00
gluh@mysql.com/eagle.(none)
3912ce7f33 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-03-16 12:16:15 +04:00
gluh@mysql.com/eagle.(none)
ec4f730ba7 Bug#26285 selecting information_schema crahes server
The crash happens when 'skip-grant-tables' is enabled.
We skip the filling of I_S privilege tables 
if acl_cache is not initialized.
2007-03-16 12:15:51 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
1e01c70351 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/mrg/mysql-5.0-opt
2007-03-16 12:06:36 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
5cb3d4f173 Merge bk@192.168.21.1:mysql-5.0
into  mysql.com:/home/hf/work/mrg/mysql-5.0-opt
2007-03-16 11:55:16 +04:00
Justin.He/justin.he@dev3-240.dev.cn.tlan
dc362d8919 Merge dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.0/mysql-5.0
into  dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.0/mysql-5.0-ndb-merge
2007-03-16 14:11:48 +08:00
Justin.He/justin.he@dev3-240.dev.cn.tlan
72f91a02e7 Merge dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.0/mysql-5.0-ndb
into  dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.0/mysql-5.0-ndb-bj-merge
2007-03-16 12:23:31 +08:00
jbruehe/mysqldev@mysql.com/production.mysql.com
6d99387502 Raise version number after cloning 5.0.38 2007-03-15 22:28:31 +01:00
svoj@mysql.com/april.(none)
8b325697dd Merge mysql.com:/home/svoj/devel/bk/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/bk/mysql-5.0-engines
2007-03-16 01:28:29 +04:00
evgen@moonbone.local
3d0df38f49 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/27033-bug-5.0-opt-mysql
2007-03-15 23:56:21 +03:00
evgen@moonbone.local
92c8558224 Bug#27033: 0 as LAST_INSERT_ID() after INSERT .. ON DUPLICATE if rows were
touched but not actually changed.

The LAST_INSERT_ID() is reset to 0 if no rows were inserted or changed.
This is the case when an INSERT ... ON DUPLICATE KEY UPDATE updates a row
with the same values as the row contains.

Now the LAST_INSERT_ID() values is reset to 0 only if there were no rows
successfully inserted or touched.
The new 'touched' field is added to the COPY_INFO structure. It holds the
number of rows that were touched no matter whether they were actually
changed or not.
2007-03-15 23:21:29 +03:00
holyfoot/hf@mysql.com/hfmain.(none)
2e3ce3c20f Merge mysql.com:/home/hf/work/26833/my50-26833
into  mysql.com:/home/hf/work/mrg/mysql-5.0-opt
2007-03-15 16:26:37 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
21847d6890 Merge bk@192.168.21.1:mysql-5.0
into  mysql.com:/home/hf/work/mrg/mysql-5.0-opt
2007-03-15 16:21:43 +04:00
dlenev@mockturtle.local
e25ea78fd4 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mockturtle.local:/home/dlenev/src/mysql-4.1-merge
2007-03-15 14:31:34 +03:00
dlenev@mockturtle.local
4f46196db9 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mockturtle.local:/home/dlenev/src/mysql-5.0-merge
2007-03-15 14:00:50 +03:00
jonas@perch.ndb.mysql.com
06219769ac ndb - fix bug in UtilTransactions::compare
reset rowcount on temporary error during scan of base table
2007-03-15 11:05:12 +01:00
dlenev@mockturtle.local
e4f88d5215 Merge mockturtle.local:/home/dlenev/src/mysql-4.1-bg25966
into  mockturtle.local:/home/dlenev/src/mysql-5.0-bg25966-2
2007-03-15 11:53:04 +03:00
dlenev@mockturtle.local
01bd08b5d7 Fix for bug #25966 "2MB per second endless memory consumption after LOCK
TABLE ... WRITE".

Memory and CPU hogging occured when connection which had to wait for table
lock was serviced by thread which previously serviced connection that was
killed (note that connections can reuse threads if thread cache is enabled).
One possible scenario which exposed this problem was when thread which
provided binlog dump to replication slave was implicitly/automatically
killed when the same slave reconnected and started pulling data through
different thread/connection.
The problem also occured when one killed particular query in connection
(using KILL QUERY) and later this connection had to wait for some table
lock.

This problem was caused by the fact that thread-specific mysys_var::abort
variable, which indicates that waiting operations on mysys layer should
be aborted (this includes waiting for table locks), was set by kill
operation but was never reset back. So this value was "inherited" by the
following statements or even other connections (which reused the same
physical thread). Such discrepancy between this variable and THD::killed
flag broke logic on SQL-layer and caused CPU and memory hogging.

This patch tries to fix this problem by properly resetting this member.

There is no test-case associated with this patch since it is hard to test
for memory/CPU hogging conditions in our test-suite.
2007-03-15 11:51:35 +03:00
dlenev@mockturtle.local
f2cb664174 Fix for bug #25966 "2MB per second endless memory consumption after LOCK
TABLE ... WRITE".

CPU hogging occured when connection which had to wait for table lock was
serviced by thread which previously serviced connection that was killed
(note that connections can reuse threads if thread cache is enabled).
One possible scenario which exposed this problem was when thread which
provided binlog dump to replication slave was implicitly/automatically
killed when the same slave reconnected and started pulling data through
different thread/connection.
In 5.* versions memory hogging was added to CPU hogging. Moreover in
those versions the problem also occured when one killed particular query
in connection (using KILL QUERY) and later this connection had to wait for
some table lock.

This problem was caused by the fact that thread-specific mysys_var::abort
variable, which indicates that waiting operations on mysys layer should
be aborted (this includes waiting for table locks), was set by kill
operation but was never reset back. So this value was "inherited" by the
following statements or even other connections (which reused the same
physical thread). Such discrepancy between this variable and THD::killed
flag broke logic on SQL-layer and caused CPU and memory hogging.

This patch tries to fix this problem by properly resetting this member.

There is no test-case associated with this patch since it is hard to test
for memory/CPU hogging conditions in our test-suite.
2007-03-15 11:30:17 +03:00
malff/marcsql@weblab.(none)
f87899c50e Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-26503
2007-03-14 14:29:27 -06:00
malff/marcsql@weblab.(none)
bef323b1d6 Bug#26503 (Illegal SQL exception handler code causes the server to crash)
Before this fix, the parser would accept illegal code in SQL exceptions
handlers, that later causes the runtime to crash when executing the code,
due to memory violations in the exception handler stack.

The root cause of the problem is instructions within an exception handler
that jumps to code located outside of the handler. This is illegal according
to the SQL 2003 standard, since labels located outside the handler are not
supposed to be visible (they are "out of scope"), so any instruction that
jumps to these labels, like ITERATE or LEAVE, should not parse.

The section of the standard that is relevant for this is :
  SQL:2003 SQL/PSM (ISO/IEC 9075-4:2003)
  section 13.1 <compound statement>,
  syntax rule 4
<quote>
  The scope of the <beginning label> is CS excluding every <SQL schema
  statement> contained in CS and excluding every
  <local handler declaration list> contained in CS. <beginning label> shall
  not be equivalent to any other <beginning label>s within that scope.
</quote>

With this fix, the C++ class sp_pcontext, which represent the "parsing
context" tree (a.k.a symbol table) of a stored procedure, has been changed
as follows:
- constructors have been cleaned up, so that only building a root node for
the tree is public; building nodes inside a tree is not public.
- a new member, m_label_scope, indicates if a given syntactic context
belongs to a DECLARE HANDLER block,
- label resolution, in the method find_label(), has been changed to
implement the restriction of scope regarding labels used in a compound
statement.

The actions in the parser, when parsing the body of a SQL exception handler,
have been changed as follows:
- the implementation of an exception handler (DECLARE HANDLER) now creates
explicitly a new sp_pcontext, to isolate the code inside the handler from
the containing compound statement context.
- registering exception handlers as a result occurs in the parent context,
see the rule sp_hcond_element
- the code in sp_hcond_list has been cleaned up, to avoid code duplication

In addition, the flags IN_SIMPLE_CASE and IN_HANDLER, declared in sp_head.h
have been removed, since they are unused and broken by design (as seen with
Bug 19194 (Right recursion in parser for CASE causes excessive stack usage,
limitation), representing a stack in a single flag is not possible.

Tests in sp-error have been added to show that illegal constructs are now
rejected.

Tests in sp have been added for code coverage, to show that ITERATE or LEAVE
statements are legal when jumping to a label in scope, inside the body of
an exception handler.
2007-03-14 12:02:32 -06:00
kent@mysql.com/kent-amd64.(none)
eda2d801ef Merge mysql.com:/home/kent/bk/tmp/mysql-4.1-build
into  mysql.com:/home/kent/bk/tmp/mysql-5.0-build
2007-03-14 18:32:06 +01:00
kent@mysql.com/kent-amd64.(none)
760a73102f Merge mysql.com:/home/kent/bk/tmp/mysql-4.0
into  mysql.com:/home/kent/bk/tmp/mysql-4.1-build
2007-03-14 18:28:52 +01:00
kent@mysql.com/kent-amd64.(none)
7c4385c4ad EXCEPTIONS-CLIENT:
Updated to version 0.6 of the text
2007-03-14 18:28:16 +01:00
gkodinov/kgeorge@magare.gmz
2525db66fa Bug #26794: fixed valgrind warning 2007-03-14 15:58:14 +02:00
kent@mysql.com/kent-amd64.(none)
201e58d14e Merge mysql.com:/home/kent/bk/tmp/mysql-4.1-build
into  mysql.com:/home/kent/bk/tmp/mysql-5.0-build
2007-03-14 14:31:44 +01:00
kent@mysql.com/kent-amd64.(none)
aea42a5444 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/kent/bk/tmp/mysql-5.0-build
2007-03-14 14:30:54 +01:00
kent@mysql.com/kent-amd64.(none)
e51c32f0b7 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/kent/bk/tmp/mysql-4.1-build
2007-03-14 14:30:12 +01:00
kent@mysql.com/kent-amd64.(none)
6b72b54716 Merge mysql.com:/home/kent/bk/tmp/mysql-4.0
into  mysql.com:/home/kent/bk/tmp/mysql-4.1-build
2007-03-14 14:29:23 +01:00
kent@mysql.com/kent-amd64.(none)
be226152ab configure.in:
Added test for sched_yield() possibly in -lposix4 on Solaris
2007-03-14 14:27:46 +01:00
gkodinov/kgeorge@magare.gmz
30a16b45d7 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B26794-5.0-opt
2007-03-14 11:55:40 +02:00
gkodinov/kgeorge@magare.gmz
8c1f70aef6 Bug #26794:
Different set of conditions is used to verify
the validity of index definitions over a GEOMETRY
column in ALTER TABLE and CREATE TABLE. 
The difference was on how sub-keys notion validity
is checked.
Fixed by extending the CREATE TABLE condition to
support the cases allowed in ALTER TABLE.
Made the SHOW CREATE TABLE not to display spatial
indexes using the sub-key notion.
2007-03-14 11:54:20 +02:00
svoj@mysql.com/april.(none)
d7311aab77 Removed tabs. 2007-03-14 02:30:05 +04:00
gkodinov/kgeorge@magare.gmz
96629f2c99 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B26672-5.0-opt
2007-03-13 18:46:46 +02:00
svoj@mysql.com/april.(none)
de21b9b8ef Merge mysql.com:/home/svoj/devel/mysql/BUG26881/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG26881/mysql-5.0-engines
2007-03-13 18:11:47 +04:00