Commit graph

38609 commits

Author SHA1 Message Date
kaa@kaamos.(none)
f41a5edfc7 Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-14 12:48:25 +03:00
gshchepa/uchum@host.loc
814314be6b Merge host.loc:/home/uchum/work/5.0-opt-gca
into  host.loc:/home/uchum/work/5.0-opt
2008-02-13 19:47:39 +04:00
gshchepa/uchum@host.loc
18770a0de8 Fixed bug#31194: Privilege ordering does not order properly
for wildcard values.
The server ignored escape character before wildcards during
the calculation of priority values for sorting of a privilege
list. (Actually the server counted an escape character as an
ordinary wildcard like % or _). I.e. the table name template
with a wildcard character like 'tbl_1' had higher priority in
a privilege list than concrete table name without wildcards
like 'tbl\_1', and some privileges of 'tbl\_1' was hidden
by privileges for 'tbl_1'.

The get_sort function has been modified to ignore escaped
wildcards as usual.
2008-02-13 19:34:12 +04:00
gshchepa/uchum@host.loc
8f6ecbca82 Fixed bug#33764: Wrong result with IN(), CONCAT() and implicit
type conversion.

Instead of copying of whole character string from a temporary
buffer, the server copied a short-living pointer to that string
into a long-living structure. That has been fixed.
2008-02-13 19:32:19 +04:00
kaa@kaamos.(none)
1a67148ccd Merge mbp:src/opt/bug33389/my50-bug25162
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-12 22:51:01 +03:00
evgen@moonbone.local
f264f92c97 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/31590-bug-5.0-opt-mysql
2008-02-12 21:58:41 +03:00
kaa@mbp.
97c105cc17 Fix for bug #33389: Selecting from a view into a table from within SP
or trigger crashes server

Under some circumstances a combination of VIEWs, subselects with outer
references and PS/SP/triggers could lead to use of uninitialized memory
and server crash as a result.

Fixed by changing the code in Item_field::fix_fields() so that in cases
when the field is a VIEW reference, we first check whether the field
is also an outer reference, and mark it appropriately before returning.
2008-02-12 12:43:55 +03:00
tnurnberg@white.intern.koehntopp.de
d628eac234 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/21567/50-21567
2008-02-11 01:45:24 +01:00
holyfoot/hf@hfmain.(none)
5f4fadefcc Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/33796/my50-33796
2008-02-10 23:53:09 +04:00
holyfoot/hf@hfmain.(none)
0b0fd39fd6 Merge mysql.com:/home/hf/work/33796/my41-33796
into  mysql.com:/home/hf/work/33796/my50-33796
2008-02-10 23:45:41 +04:00
holyfoot/hf@mysql.com/hfmain.mysql.com
367e7e87dd Bug #33796 Memory leak for prepared statements in embedded server.
Field data for a query was stored to the stmt->alloc that is emptied
with mysql_stmt_close statement only. That means a lot of memory can
be occupied without a reason if used doesn't call mysql_stmt_close often.
2008-02-10 23:41:57 +04:00
tnurnberg@blasphemy.intern.azundris.com
5e23ea7288 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/tnurnberg/21567/50-21567
2008-02-10 16:54:41 +01:00
gshchepa/uchum@host.loc
919f86fbb6 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  host.loc:/home/uchum/work/5.0-opt
2008-02-08 17:04:07 +04:00
gshchepa/uchum@host.loc
2e9f2b678c Fixed bug#15409: Columns with 64-element SET may not be updated with integers.
SET column storing procedure has been modified to be 64bit-clean.
2008-02-08 16:04:01 +04:00
evgen@sunlight.local
a927bdbe3e Bug#31590: Wrong error message on sort buffer being too small.
The out of memory error was thrown when the sort buffer size were too small.
This led to a user confusion.

Now filesort throws the error message about sort buffer being too small.
2008-02-08 13:35:00 +03:00
sergefp@pslp.mylan
e9f258756d Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/psergey/mysql-5.0-bug27732
2008-02-07 16:54:47 +03:00
gshchepa/uchum@host.loc
83bb97b495 Merge host.loc:/home/uchum/work/5.0-opt-34223
into  host.loc:/home/uchum/work/5.0-opt
2008-02-07 11:13:03 +04:00
gshchepa/uchum@host.loc
fa1f0d6b17 innodb_mysql.test, variables.result, variables.test, innodb_mysql.result:
Minor post-fix for bug#34223.
2008-02-07 11:12:49 +04:00
sergefp@mysql.com
954a16c6d3 BUG#27732 "Possible memory leak with index_merge"
The bug was that handler::clone/handler::ha_open() call caused allocation of 
cloned_copy->ref on the handler->table->mem_root. The allocated memory could not 
be reclaimed until the table is flushed, so it was possible to exhaust memory by 
repeatedly running index_merge queries without doing table flushes.  

The fix:
- make handler::clone() allocate new_handler->ref on the passed mem_root 
- make handler::ha_open() not allocate this->ref if it has already been allocated
There is no testcase as it is not possible to check small leaks from testsuite.
2008-02-07 05:10:04 +03:00
gshchepa/uchum@host.loc
368a8bb442 Merge host.loc:/home/uchum/work/5.0-opt-34223
into  host.loc:/home/uchum/work/5.0-opt
2008-02-07 04:57:21 +04:00
gshchepa/uchum@host.loc
543140a6d8 bdb.result:
Minor post-fix for bug#30059.
2008-02-07 04:54:58 +04:00
gshchepa/uchum@host.loc
8adc63ad36 Fixed bug#34223: Failure on assignment to my_innodb_autoextend_increment
and my_innodb_commit_concurrency global variables.

Type of the my_innodb_autoextend_increment and the
my_innodb_commit_concurrency variables has been changed to
GET_ULONG.
2008-02-07 04:14:50 +04:00
gshchepa/uchum@host.loc
8715855aa0 Fixed bug#30059.
Server handles truncation for assignment of too-long values
into CHAR/VARCHAR/TEXT columns in a different ways when the
truncated characters are spaces:
1. CHAR(N) columns silently ignore end-space truncation;
2. TEXT columns post a truncation warning/error in the
   non-strict/strict mode.
3. VARCHAR columns always post a truncation note in
   any mode.

Space truncation processing has been synchronised over
CHAR/VARCHAR/TEXT columns: current behavior of VARCHAR
columns has been propagated as standard.

Binary-encoded string/BLOB columns are not affected.
2008-02-07 02:33:21 +04:00
tnurnberg@blasphemy.intern.azundris.com
9928dac5f3 Bug#21567: mysqld doesn't react to Ctrl-C when run under GDB even with the --gdb option
Don't block SIGINT (Control-C) when --gdb is passed to mysqld.
Was broken at least on OS X.

(kudos to Mattias Jonsson)
2008-02-05 12:56:49 +01:00
kaa@mbp.local
e80794b3ee Merge mbp.local:/Users/kaa/src/opt/bug25162/my50-bug25162
into  mbp.local:/Users/kaa/src/opt/mysql-5.0-opt
2008-02-01 13:37:22 +05:00
kaa@mbp.local
663453d572 Fix for bug #25162: Backing up DB from 5.1 adds 'USING BTREE' to KEYs
on table creates

The problem was in incompatible syntax for key definition in CREATE
TABLE.

5.0 supports only the following syntax for key definition (see "CREATE
TABLE syntax" in the manual):

{INDEX|KEY} [index_name] [index_type] (index_col_name,...)

While 5.1 parser supports the above syntax, the "preferred" syntax was
changed to:

{INDEX|KEY} [index_name] (index_col_name,...) [index_type]

The above syntax is used in 5.1 for the SHOW CREATE TABLE output, which
led to dumps generated by 5.1 being incompatible with 5.0.

Fixed by changing the parser in 5.0 to support both 5.0 and 5.1 syntax
for key definition.
2008-02-01 13:00:40 +05:00
evgen@moonbone.local
f967e24718 Bug#30787: Stored function ignores user defined alias.
Simple subselects are pulled into upper selects. This operation substitutes the
pulled subselect for the first item from the select list of the subselect.
If an alias is defined for a subselect it is inherited by the replacement item.
As this is done after fix_fields phase this alias isn't showed if the
replacement item is a stored function. This happens because the Item_func_sp::make_field
function makes send field from its result_field and ignores the defined alias.

Now when an alias is defined the Item_func_sp::make_field function sets it for
the returned field.
2008-01-31 23:46:26 +03:00
igor@olga.mysql.com
5e14047e23 Fixed bug #33833.
Two disjuncts containing equalities of the form key=const1 and key=const2 can
be merged into one if const1 is equal to const2. To check it the common 
collation of the constants were used rather than the collation of the field key.
For example when the default collation of the constants was cases insensitive
while the collation of the field was case sensitive, then two or-ed equality 
predicates key='b' and key='B' incorrectly were merged into one f='b'. As a 
result ref access was used instead of range access and wrong result sets were 
returned in many cases. 
Fixed the problem by comparing constant in the or-ed predicate with collation of
the key field.
2008-01-26 21:45:35 -08:00
kaa@kaamos.(none)
6619db580d Fixed a PushBuild failure of the system_mysql_db test caused by the lack
of cleanups in the test case for bug33794.
2008-01-20 13:46:55 +03:00
mhansson@lamia.dupka
e3e370dd9d Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  lamia.dupka:/home/mhansson/my50-bug33143-again-pushee
2008-01-18 22:45:14 +02:00
sergefp@mysql.com
d56ac2f37b BUG#33794 "MySQL crashes executing specific query":
The problem occurred when one had a subquery that had an equality X=Y where 
Y referred to a named select list expression from the parent select. MySQL 
crashed when trying to use the X=Y equality for ref-based access. 

Fixed by allowing non-Item_field items in the described case.
2008-01-18 22:50:36 +03:00
mhansson/martin@linux-st28.site
7207d3ce21 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bug33143/my50-bug33143-again-pushee
2008-01-17 18:15:53 +01:00
mhansson/martin@linux-st28.site
effe27e350 Bug#33143: Incorrect ORDER BY for ROUND()/TRUNCATE() result
The ROUND(X, D) function would change the Item::decimals field during
execution to achieve the effect of a dynamic number of decimal digits.
This caused a series of bugs:
Bug #30617:Round() function not working under some circumstances in InnoDB
Bug #33402:ROUND with decimal and non-constant cannot round to 0 decimal places
Bug #30889:filesort and order by with float/numeric crashes server
Fixed by never changing the number of shown digits for DECIMAL when
used with a nonconstant number of decimal digits.
2008-01-14 16:16:36 +01:00
mhansson@lamia.dupka
8eb74b1f5f Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  lamia.dupka:/home/mhansson/my50-bug31797-pushee
2008-01-12 18:59:05 +02:00
mhansson/martin@linux-st28.site
e24109c6d1 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bug31797/my50-bug31797-pushee
2008-01-11 19:00:26 +01:00
mhansson/martin@linux-st28.site
199a167246 Bug#31797: error while parsing subqueries -- WHERE is parsed as HAVING
The name resolution for correlated subqueries and HAVING clauses
failed to distinguish which of two was being performed when there 
was a reference to an outer aliased field.
Fixed by adding the condition that HAVING clause name resulotion
is being performed.
2008-01-11 18:50:54 +01:00
evgen@moonbone.local
baaf300d4c Bug#29477: Not all fields of the target table were checked to have a default
value when inserting into a view.

The mysql_prepare_insert function checks all fields of the target table that
directly or indirectly (through a view) are specified in the INSERT
statement to have a default value. This check can be skipped if the INSERT
statement doesn't mention any insert fields. In case of a view this allows
fields that aren't mentioned in the view to bypass the check.

Now fields of the target table are always checked to have a default value
when insert goes into a view.
2008-01-11 20:10:54 +03:00
kaa@kaamos.(none)
f8ade5e91b Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-01-10 20:43:05 +03:00
evgen@moonbone.local
7f933eb3e0 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/33675-bug-5.0-opt-mysql
2008-01-10 19:23:36 +03:00
evgen@moonbone.local
830b8f0e30 filesort.cc:
Bug#33675: Usage of an uninitialized memory by filesort in a subquery caused
  server crash.
  Free smaller buffer before allocating bigger one.
2008-01-10 18:54:34 +03:00
kaa@kaamos.(none)
6e60a185d3 Merge kaamos.(none):/data/src/opt/mysql-4.1-opt
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-01-10 14:01:25 +03:00
kaa@kaamos.(none)
749157d66e Merge kaamos.(none):/data/src/opt/bug33305/my50-bug33305
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-01-10 13:45:11 +03:00
evgen@moonbone.local
165dfa3eba Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/33675-bug-5.0-opt-mysql
2008-01-09 23:19:46 +03:00
gkodinov/kgeorge@magare.gmz
5a01be841a Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B33133-5.0-opt
2008-01-09 16:52:11 +02:00
gkodinov/kgeorge@macbook.gmz
2fc45f017d Bug #33133: Views are not transparent
When resolving references we need to take into consideration
the view "fields" and allow qualified access to them.
Fixed by extending the reference resolution to process view
fields correctly.
2008-01-09 16:49:13 +02:00
evgen@moonbone.local
ce111a0d73 Bug#33675: Usage of an uninitialized memory by filesort in a subquery caused
server crash.

The filesort implementation has an optimization for subquery execution which
consists of reusing previously allocated buffers. In particular the call to
the read_buffpek_from_file function might be skipped when a big enough buffer
for buffer descriptors (buffpeks) is already allocated. Beside allocating
memory for buffpeks this function fills allocated buffer with data read from
disk. Skipping it might led to using an arbitrary memory as fields' data and
finally to a crash.

Now the read_buffpek_from_file function is always called. It allocates
new buffer only when necessary, but always fill it with correct data.
2008-01-09 00:40:41 +03:00
gkodinov/kgeorge@magare.gmz
7fe932ed82 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B33256-5.0-opt
2008-01-07 18:55:05 +02:00
kaa@polly.(none)
578b3632cc Fix for bug #33305: Test case in 'skip_grants' file need dynamic loading
to be compiled in

The problem was that on a statically built server an attempt to create
a UDF resulted in a different, but reasonable error ("Can't open shared
library" instead of "UDFs are unavailable with the --skip-grant-tables
option"), which caused a failure for the test case for bug #32020.

Fixed by moving the test case for bug #32020 from skip_grants.test to a
separate test to ensure that it is only run when the server is built
with support for dynamically loaded libraries.
2007-12-24 17:42:13 +03:00
joerg@trift2.
bf1ba3d416 Merge trift2.:/MySQL/M50/clone-5.0
into  trift2.:/MySQL/M50/merge-5.0
2007-12-21 12:48:14 +01:00
gkodinov/kgeorge@macbook.gmz
e4efb4a521 Bug #33256: CREATE ... SELECT creates obsolete table
w/ Field_date instead of Field_newdate
  
Field_date was still used in temp table creation.
Fixed by using Field_newdate consistently throughout the server
except when reading tables defined with older MySQL version.
No test suite is possible because both Field_date and Field_newdate
return the same values in all the metadata calls.
2007-12-21 12:44:24 +02:00