Commit graph

399 commits

Author SHA1 Message Date
Alexander Nozdrin
09942fe8e8 Manual merge from mysql-trunk-merge.
Conflicts:
  - include/my_no_pthread.h
  - mysql-test/r/sp-ucs2.result
  - sql/log.cc
  - sql/sql_acl.cc
  - sql/sql_yacc.yy
2009-12-16 21:02:21 +03:00
Evgeny Potemkin
5466618420 Post-merge fix. 2009-12-14 17:17:41 +03:00
Alexander Nozdrin
bc2d4e620a Manual merge from mysql-trunk-merge.
Conflicts:
  - extra/comp_err.c
  - mysql-test/collections/default.experimental
  - mysql-test/r/archive.result
  - mysql-test/r/select.result
  - mysql-test/suite/binlog/r/binlog_unsafe.result
  - mysql-test/suite/binlog/t/binlog_unsafe.test
  - mysql-test/suite/rpl/t/disabled.def
  - mysql-test/t/archive.test
  - mysql-test/t/select.test
  - sql/item.cc
  - sql/item.h
  - sql/item_timefunc.cc
  - sql/sql_base.cc
  - sql/sql_delete.cc
  - sql/sql_load.cc
  - sql/sql_partition.cc
  - sql/sql_table.cc
  - storage/innobase/handler/ha_innodb.cc
  - vio/vio.c
2009-12-12 23:38:59 +03:00
Alexey Kopytov
72b2943594 Manual merge of mysql-5.1-bugteam into mysql-trunk-merge. 2009-12-11 19:40:58 +03:00
Alexander Nozdrin
69cfd5c8ec Manual merge from mysql-trunk.
Conflicts:
  - client/mysqltest.cc
  - mysql-test/collections/default.experimental
  - mysql-test/suite/rpl/t/disabled.def
  - sql/mysqld.cc
  - sql/opt_range.cc
  - sql/sp.cc
  - sql/sql_acl.cc
  - sql/sql_partition.cc
  - sql/sql_table.cc
2009-12-11 12:39:38 +03:00
Alexander Barkov
3707a74e6e Bug#44131 Binary-mode "order by" returns records in incorrect order for UTF-8 strings
Problem: Item_char_typecast reported wrong max_length when
casting to BINARY, which lead, in particular, in wrong
"ORDER BY BINARY(char_column)" results.

Fix: making Item_char_typecast report correct max_length.

  @ mysql-test/r/ctype_utf16.result
    Fixing old incorrect test result.
  @ mysql-test/r/ctype_utf32.result
    Fixing old incorrect test result.
  @ mysql-test/r/ctype_utf8.result
    Adding new test
  @ mysql-test/t/ctype_utf8.test
    Adding new test
  @ sql/item_timefunc.cc
    Making Item_char_typecast report correct max_length
    when cast is done to BINARY.
2009-12-03 13:22:34 +04:00
Davi Arnaut
ecb6228c62 Manual merge of mysql-next-mr-runtime upstream. 2009-11-19 21:48:08 -02:00
Christopher Powers
7de4cf026a Bug #48739 MySQL crashes on specific INTERVAL in select query
Fixed crash caused by x64 int/long incompatibility introduced
in Bug #29125.
2009-11-19 16:49:13 -06:00
Magne Mahre
b1006c87f7 Bug#42661: sec_to_time() and signedness
Bug#42662: maketime() and signedness
      
Item_time_typecast::val_int() dropped sign from
MYSQL_TIME gotten using from get_time().
      
Propagates sign now.


Backported to 5.5.0  (6.0-codebase revid: 1810.3897.1)
2009-11-04 09:53:38 +01:00
Magne Mahre
b79b3c6581 Bug #36466: Adding days to day_microsecond changes interpretation of microseco
When less than six places are given for microseconds, we zerofill from
the right (leftmost place is always 1/10s). We only did this when all
announced date/time fields were given; now we also format fractional
seconds when more significant fields are left out.
2009-11-03 23:29:16 +01:00
Mikael Ronstrom
d9e05040f4 Merged WL#3352 into mysql-next-mr 2009-10-28 18:22:36 +01:00
Alexander Barkov
344ddc85fa Merging mysql-next-mr-merge to mysql-next-mr. 2009-10-21 15:48:22 +05:00
Mattias Jonsson
4ee04f9bfe port of fixes for bug-20577 and 46362 for TO_SECONDS 2009-10-19 13:40:08 +02:00
Mattias Jonsson
49c446059c Manual merge mysql-trunk -> mysql-trunk-wl3352 2009-10-19 12:09:52 +02:00
Sergey Glukhov
7741d9b50d WL#751 Error message construction, backport 2009-10-15 17:23:43 +05:00
Alexander Nozdrin
ca08f10ccd Manual merge from mysql-trunk-merge. 2009-10-14 12:25:39 +04:00
Staale Smedseng
8b9843408d Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2

Cleaning up warnings not present in 5.0.
2009-09-23 15:21:29 +02:00
Staale Smedseng
5051100a1a Merge from 5.0 2009-09-17 17:25:52 +02:00
Staale Smedseng
38b6d49e82 Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2
      
This is the fifth patch cleaning up more GCC warnings about
variables used before initialized using the new macro
UNINIT_VAR().
2009-09-17 17:10:30 +02:00
Marc Alff
08ffe21317 Merge mysql-next-mr --> mysql-trunk-signal 2009-09-17 03:20:11 -06:00
Mikael Ronstrom
12627d4072 WL#3352, Introducing Column list partitioning, makes it possible to partition on most data types, makes it possible to prune on multi-field partitioning 2009-09-15 17:07:52 +02:00
Marc Alff
d5fd452d7c WL#2110 (SIGNAL)
WL#2265 (RESIGNAL)

Manual merge of SIGNAL and RESIGNAL to mysql-trunk-signal,
plus required dependencies.
2009-09-10 03:18:29 -06:00
Mattias Jonsson
2c5e227875 Manual merge between bug#46362 and bug#20577. 2009-08-28 12:55:59 +02:00
Mattias Jonsson
401fb7c6fb Bug#20577: Partitions: use of to_days() function leads to selection failures
Problem was that the partition containing NULL values
was pruned away, since '2001-01-01' < '2001-02-00' but
TO_DAYS('2001-02-00') is NULL.

Added the NULL partition for RANGE/LIST partitioning on TO_DAYS()
function to be scanned too.

Also fixed a bug that added ALLOW_INVALID_DATES to sql_mode
(SELECT * FROM t WHERE date_col < '1999-99-99' on a RANGE/LIST
partitioned table would add it).
2009-08-26 12:59:49 +02:00
Mattias Jonsson
3b756a01a0 Bug#46362: Endpoint should be set to false for TO_DAYS(DATE)
There were a problem since pruning uses the field
for comparison (while evaluate_join_record uses longlong),
resulting in pruning failures when comparing DATE to DATETIME.

Fix was to always comparing DATE vs DATETIME as DATETIME,
by adding ' 00:00:00' to the DATE string.

And adding optimization for comparing with 23:59:59, so that
DATETIME_col > '2001-02-03 23:59:59' ->
TO_DAYS(DATETIME_col) > TO_DAYS('2001-02-03 23:59:59') instead
of '>='.
2009-08-26 12:51:23 +02:00
Staale Smedseng
27eff2bcac Merge from 5.0-bugteam for 43414 2009-06-09 18:44:26 +02:00
Staale Smedseng
dae006c17f Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2
      
Compiling MySQL with gcc 4.3.2 and later produces a number of 
warnings, many of which are new with the recent compiler
versions.
      
This bug will be resolved in more than one patch to limit the
size of changesets. This is the first patch, fixing a number 
of the warnings, predominantly "suggest using parentheses 
around && in ||", and empty for and while bodies.
2009-06-09 18:11:21 +02:00
Staale Smedseng
53d9b3d92d Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2

Compiling MySQL with gcc 4.3.2 and later produces a number of 
warnings, many of which are new with the recent compiler
versions.

This bug will be resolved in more than one patch to limit the
size of changesets. This is the first patch, fixing a number 
of the warnings, predominantly "suggest using parentheses 
around && in ||", and empty for and while bodies.
2009-06-09 14:55:30 +02:00
Ignacio Galarza
2d9421c3bb Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-13 11:41:47 -05:00
Ignacio Galarza
2b85c64d65 Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-10 17:47:54 -05:00
Tatiana A. Nurnberg
4e0e0db47e Bug#42661: sec_to_time() and signedness
Bug#42662: maketime() and signedness

Item_time_typecast::val_int() dropped sign from
MYSQL_TIME gotten using from get_time().

Propagates sign now.
2009-02-09 06:21:48 +01:00
Sergey Glukhov
429409eb19 5.0-bugteam->5.1-bugteam merge 2008-12-23 18:21:01 +04:00
Sergey Glukhov
26e804d0a7 Bug#37575 UCASE fails on monthname
The MONTHNAME/DAYNAME functions
returns binary string, so the LOWER/UPPER functions
are not effective on the result of MONTHNAME/DAYNAME call.  
Character set of the MONTHNAME/DAYNAME function
result has been changed to connection character set.
2008-12-23 18:08:04 +04:00
Ramil Kalimullin
5a8fd4a3ce Auto-merge 2008-11-21 17:32:45 +04:00
Ramil Kalimullin
a78629c40c Fix for bug#36772: When using UTF8, CONVERT with GROUP BY
returns truncated results

Problem: performig conversion from {INT, DECIMAL, REAL} to CHAR
we incorrectly set its max length in some cases that may lead
to truncated results returned.

Fix: properly set CONVERT({INT, DECIMAL, REAL}, CHAR) result's
max length.
2008-11-21 13:48:22 +04:00
anozdrin/alik@quad.
340906f46d Fix for Bug#30217: Views: changes in metadata behaviour
between 5.0 and 5.1.
  
The problem was that in the patch for Bug#11986 it was decided
to store original query in UTF8 encoding for the INFORMATION_SCHEMA.
This approach however turned out to be quite difficult to implement
properly. The main problem is to preserve the same IS-output after
dump/restore.
  
So, the fix is to rollback to the previous functionality, but also
to fix it to support multi-character-set-queries properly. The idea
is to generate INFORMATION_SCHEMA-query from the item-tree after
parsing view declaration. The IS-query should:
  - be completely in UTF8;
  - not contain character set introducers.
  
For more information, see WL4052.
2008-02-22 13:30:33 +03:00
tsmith@ramayana.hindu.god
6668554a8d Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2008-01-22 15:56:15 -07: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
tnurnberg@white.intern.koehntopp.de
786b3a2b16 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/misc/mysql/32770/51-32770
2007-12-17 08:10:13 +01:00
tnurnberg@white.intern.koehntopp.de
2ab88382ef Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/32770/50-32770
2007-12-17 07:54:32 +01:00
tnurnberg@white.intern.koehntopp.de
4abda87881 Merge mysql.com:/misc/mysql/32770/50-32770
into  mysql.com:/misc/mysql/32770/51-32770
2007-12-17 07:49:26 +01:00
cmiller@zippy.cornsilk.net
c940d64a69 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
2007-12-14 10:52:10 -05:00
tnurnberg@mysql.com/white.intern.koehntopp.de
8651aeb2c4 Bug#32770: LAST_DAY() returns a DATE, but somehow internally keeps track of the TIME.
LAST_DAY() says it returns a DATE, not a DATETIME, but didn't zero the time fields.
Adapted from a patch kindly supplied by Claudio Cherubino.
2007-12-10 09:17:18 +01:00
tsmith@ramayana.hindu.god
8fc0bfb6b6 Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51-merge
2007-12-05 12:33:36 -07:00
tsmith@ramayana.hindu.god
10cab933b2 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50
2007-12-04 20:58:21 -07:00
ramil/ram@ramil.myoffice.izhnet.ru
c102112f09 Merge mysql.com:/home/ram/work/b32137/b32137.5.0
into  mysql.com:/home/ram/work/b32137/b32137.5.1
2007-11-10 18:43:44 +04:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
f3813c920e manual merge. 2007-11-10 18:27:57 +04:00
tnurnberg@white.intern.koehntopp.de
80a3f89ea4 Merge mysql.com:/misc/mysql/31990/50-31990
into  mysql.com:/misc/mysql/31990/51-31990
2007-11-10 03:11:18 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
5a5ed2a509 Bug#31990: MINUTE() and SECOND() return bogus results when used on a DATE
HOUR(), MINUTE(), ... returned spurious results when used on a DATE-cast.
This happened because DATE-cast object did not overload get_time() method
in superclass Item. The default method was inappropriate here and
misinterpreted the data.

Patch adds missing method; get_time() on DATE-casts now returns SQL-NULL
on NULL input, 0 otherwise. This coincides with the way DATE-columns
behave.
2007-11-08 06:08:44 +01:00
gkodinov/kgeorge@magare.gmz
7f8c4aacf6 Merge magare.gmz:/home/kgeorge/mysql/work/B31221-5.0-gca-opt
into  magare.gmz:/home/kgeorge/mysql/work/B31221-5.1-opt
2007-10-18 15:57:59 +03:00