Commit graph

20071 commits

Author SHA1 Message Date
ibabaev@bk-internal.mysql.com
45fb6c90f0 Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
2007-03-20 03:59:32 +01:00
evgen@moonbone.local
41c732493e sql_insert.cc:
After merge fix.
2007-03-20 01:37:33 +03:00
evgen@moonbone.local
37add3b661 Merge moonbone.local:/mnt/gentoo64/work/27006-bug-5.0-opt-mysql
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
2007-03-20 01:29:09 +03: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
serg@janus.mylan
5a5bcc741b Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-03-17 09:12:26 +01:00
serg@janus.mylan
68fd66e853 wl#3700 - post-review fixes:
s/ulonglong/key_part_map/, comments
2007-03-17 00:13:25 +01:00
evgen@moonbone.local
cb89159eb1 sql_insert.cc:
Post-merge fix.
2007-03-16 23:10:12 +03:00
serg@janus.mylan
55a548cf4d Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-03-16 20:33:27 +01:00
holyfoot/hf@mysql.com/hfmain.(none)
5233a2a52a merging 2007-03-16 22:23:37 +04:00
holyfoot/hf@hfmain.(none)
cc9fe9c3e1 Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt
into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
2007-03-16 22:09:10 +04: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
serg@janus.mylan
f813272125 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-03-16 14:09:30 +01: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
holyfoot/hf@hfmain.(none)
1d0b7020b3 Merge bk@192.168.21.1:mysql-5.1
into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
2007-03-16 11:54:36 +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@hfmain.(none)
1f77f3dbcb Merge mysql.com:/home/hf/work/26833/my51-26833
into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
2007-03-15 16:27:12 +04: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@hfmain.(none)
6767673750 Merge bk@192.168.21.1:mysql-5.1
into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt
2007-03-15 16:22:32 +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
bb233cb349 Merge mockturtle.local:/home/dlenev/src/mysql-5.0-bg25966-2
into  mockturtle.local:/home/dlenev/src/mysql-5.1-bg25966
2007-03-15 11:55:15 +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
gkodinov/kgeorge@magare.gmz
5e2e4161d9 Bug #26794: fixed valgrind warning 2007-03-14 17:07:48 +02:00
gkodinov/kgeorge@magare.gmz
a0499f3001 Merge bk-internal:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B26794-merge-5.1-opt
2007-03-14 17:05:43 +02:00
gkodinov/kgeorge@magare.gmz
2fd1bd92a3 Merge magare.gmz:/home/kgeorge/mysql/autopush/B26794-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B26794-merge-5.1-opt
2007-03-14 17:04:45 +02:00
gkodinov/kgeorge@magare.gmz
2525db66fa Bug #26794: fixed valgrind warning 2007-03-14 15:58:14 +02:00
mhansson@dl145s.mysql.com
19f479d61f Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/users/mhansson/mysql/autopush/5.1o-bug24778
2007-03-14 12:44:58 +01:00
gkodinov/kgeorge@magare.gmz
31b636c041 WL#3527 : inspected a 5.1 covarage report 2007-03-14 13:32:12 +02:00
mhansson/martin@linux-st28.site
e61cce4d6b Bug #24778: Innodb: No result when using ORDER BY
This bug was intruduced by the fix for bug#17212 (in 4.1). It is not 
ok to call test_if_skip_sort_order since this function will 
alter the execution plan. By contract it is not ok to call 
test_if_skip_sort_order in this context.

This bug appears only in the case when the optimizer has chosen 
an index for accessing a particular table but finds a covering 
index that enables it to skip ORDER BY. This happens in 
test_if_skip_sort_order.
2007-03-14 12:15:14 +01:00
gkodinov/kgeorge@magare.gmz
03df3bf6db Bug #26794: 5.1 part
It was syntactically correct to define 
 spatial keys over parts of columns (e.g.
 ALTER TABLE t1 ADD x GEOMETRY NOT NULL, 
   ADD SPATIAL KEY (x(32))).
 This may lead to undefined results and/or
 interpretation.
 Fixed by not allowing partial column 
 specification in a SPATIAL index definition.
2007-03-14 12:20:34 +02: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
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
svoj@mysql.com/april.(none)
cb132bea8f BUG#26881 - Large MERGE tables report incorrect specification when no
differences in tables
Certain merge tables were wrongly reported as having incorrect definition:
- Some fields that are 1 byte long (e.g. TINYINT, CHAR(1)), might
  be internally casted (in certain cases) to a different type on a
  storage engine layer. (affects 4.1 and up)
- If tables in a merge (and a MERGE table itself) had short VARCHAR column (less
  than 4 bytes) and at least one (but not all) tables were ALTER'ed (even to an
  identical table: ALTER TABLE xxx ENGINE=yyy), table definitions went ouf of
  sync. (affects 4.1 only)

This is fixed by relaxing a check for underlying conformance and setting
field type to FIELD_TYPE_STRING in case varchar is shorter than 4
when a table is created.
2007-03-13 18:02:06 +04:00
svoj@mysql.com/april.(none)
11384fece2 Merge mysql.com:/home/svoj/devel/bk/mysql-5.0
into  mysql.com:/home/svoj/devel/mysql/BUG26881/mysql-5.0-engines
2007-03-13 16:58:52 +04:00
svoj@mysql.com/april.(none)
576db4f44c Merge mysql.com:/home/svoj/devel/bk/mysql-4.1
into  mysql.com:/home/svoj/devel/mysql/BUG26881/mysql-4.1-engines
2007-03-13 16:57:16 +04:00
gkodinov/kgeorge@magare.gmz
3542315de6 Merge magare.gmz:/home/kgeorge/mysql/work/B26794-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B26794-5.1-opt
2007-03-12 17:08:42 +02:00
gkodinov/kgeorge@magare.gmz
36d2a231e3 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-12 16:57:00 +02:00
kent@kent-amd64.(none)
43e3a9b56a Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/kent/bk/tmp/mysql-5.1-build
2007-03-12 13:37:51 +01:00
gkodinov/kgeorge@magare.gmz
f2ce1445e1 group_by.result:
WL3527: disable wrong optimization.
sql_select.cc:
  WL#3527: disable wrong optimization.
2007-03-12 13:20:46 +02:00
igor@olga.mysql.com
d0a6231201 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26963
2007-03-12 02:24:09 -07:00
igor@olga.mysql.com
06a315ded6 Fixed bug #26738: incomplete string values in a result set column
when the column is to be read from a derived table column which 
was specified as a concatenation of string literals.
The bug happened because the Item_string::append did not adjust the
value of Item_string::max_length. As a result of it the temporary 
table column  defined to store the concatenation of literals was 
not wide enough to hold the whole value.
2007-03-12 01:39:57 -07:00
igor@olga.mysql.com
e7284ace4f Fixed bug #26963: invalid optimization of the pushdown conditions
after single-row table substitution could lead to a wrong result set.
The bug happened because the function Item_field::replace_equal_field
erroniously assumed that any field included in a multiple equality
with a constant has been already substituted for this constant.
This not true for fields becoming constant after row substitutions
for constant tables.
2007-03-11 23:34:40 -07:00
gkodinov/kgeorge@magare.gmz
a474f33494 WL3527: post-merge updates
sql_yacc.yy:
  WL3527: updated the diff to use correct parser words
table.cc:
  WL3527: exteneded the fix for bug #20604 to fit the new variables
sql_select.cc:
  WL3527: renamed used_keys to covering_keys
2007-03-11 14:31:43 +02:00