Commit graph

2125 commits

Author SHA1 Message Date
tnurnberg@white.intern.koehntopp.de
7c0c9db590 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  mysql.com:/misc/mysql/24907/51-24907
2007-11-17 19:44:19 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
909fcea6e1 Bug#24907: unpredictable (display) precission, if input precission increases
post-merge fixes: some things work differently in 5.1
2007-11-17 19:42:16 +01:00
tnurnberg@white.intern.koehntopp.de
18fc735701 Merge mysql.com:/misc/mysql/24907/50-24907
into  mysql.com:/misc/mysql/24907/51-24907
2007-11-17 19:12:36 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
6889c82997 Bug#24907: unpredictable (display) precission, if input precission increases
Server failed in assert() when we tried to create a DECIMAL() temp field
with a scale of more than the allowed 30. Now we limit the scale to the
allowed maximum. A truncation warning is thrown as necessary.
2007-11-17 19:05:31 +01:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
dc8d3d0bec Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys

Problems: 
  1. ALTER TABLE ... ORDER BY... doesn't make sence if there's a 
     user-defined clustered index in the table.
  2. using a secondary index is slower than using a clustered one 
     for a table scan.

Fixes:
  1. raise a warning.
  2. use the clustered index.
2007-11-07 19:59:58 +04:00
tsmith@ramayana.hindu.god
e347c1413a Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2007-10-22 14:32:22 -06:00
malff@lambda.hsd1.co.comcast.net.
2d6fbbda59 Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge
2007-10-18 16:57:51 -06:00
kaa@polly.(none)
97226f1027 Merge polly.(none):/home/kaa/src/maint/mysql-5.0-maint
into  polly.(none):/home/kaa/src/maint/mysql-5.1-maint
2007-10-18 14:32:43 +04:00
kaa@polly.(none)
3af902ec47 Merge polly.(none):/home/kaa/src/maint/bug31207/my50-bug31174
into  polly.(none):/home/kaa/src/maint/mysql-5.0-maint
2007-10-18 13:47:35 +04:00
kaa@polly.(none)
6d1f3e8de5 Fix for bug #31207: Test "join_nested" shows different strategy on IA64
CPUs / Intel's ICC compile

The bug is a combination of two problems:

1. IA64/ICC MySQL binaries use glibc's qsort(), not the one in mysys.

2. The order relation implemented by join_tab_cmp() is not transitive,
i.e. it is possible to choose such a, b and c that (a < b) && (b < c)
but (c < a). This implies that result of a sort using the relation
implemented by join_tab_cmp() depends on the order in which
elements are compared, i.e. the result is implementation-specific. Since
choose_plan() uses qsort() to pre-sort the
join tables using join_tab_cmp() as a compare function, the results of
the sorting may vary depending on qsort() implementation.

It is neither possible nor important to implement a better ordering
algorithm in join_tab_cmp(). Therefore the only way to fix it is to
force our own qsort() to be used by renaming it to my_qsort(), so we don't depend
on linker to decide that.

This patch also "fixes" bug #20530: qsort redefinition violates the
standard.
2007-10-17 20:08:58 +04:00
ramil/ram@ramil.myoffice.izhnet.ru
1e4ff5c09b Merge mysql.com:/home/ram/work/b31249/b31249.5.0
into  mysql.com:/home/ram/work/b31249/b31249.5.1
2007-10-09 16:21:27 +05:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
4792385177 Fix for bug #31249: Assertion `!table || (!table->write_set ||
bitmap_is_set(table->write_set, fiel

Problem: creating a temporary table we allocate the group buffer if needed
followed by table bitmaps (see create_tmp_table()). Reserving less memory for 
the group buffer than actually needed (used) for values retrieval may lead 
to overlapping with followed bitmaps in the memory pool that in turn leads 
to unpredictable consequences.

As we use Item->max_length sometimes to calculate group buffer size,
it must be set to proper value. In this particular case 
Item_datetime_typecast::max_length is too small.

Another problem is that we use max_length to calculate the group buffer
key length for items represented as DATE/TIME fields which is superfluous.

Fix: set Item_datetime_typecast::max_length properly,
accurately calculate the group buffer key length for items 
represented as DATE/TIME fields in the buffer.
2007-10-09 14:37:21 +05:00
kostja@bodhi.(none)
53b0324824 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime
2007-10-08 02:05:10 +04:00
anozdrin/alik@station.
ac875690f7 Fix for BUG#20550: Stored function: wrong RETURN type metadata
when used in a VIEW.

The problem was that wrong function (create_tmp_from_item())
was used to create a temporary field for Item_func_sp.

The fix is to use create_tmp_from_field().
2007-10-05 16:35:01 +04:00
tsmith@sita.local
5aba321046 Merge sita.local:/Users/tsmith/m/bk/50
into  sita.local:/Users/tsmith/m/bk/maint/50
2007-09-24 11:33:27 +02:00
gkodinov/kgeorge@macbook.local
4eee02dd3d fixed type conversion warnings revealed by bug 30639 2007-09-21 10:15:16 +02:00
gkodinov/kgeorge@magare.gmz
6927e67dd9 Merge magare.gmz:/home/kgeorge/mysql/work/B31001-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B31001-5.1-opt
2007-09-14 19:03:14 +03:00
gkodinov/kgeorge@magare.gmz
a2afc56f61 Bug #31001: ORDER BY DESC in InnoDB not working
The optimizer sets index traversal in reverse order only if there are 
 used key parts that are not compared to a constant.
However using the primary key as an ORDER BY suffix rendered the check
incomplete : going in reverse order must still be used even if 
all the parts of the secondary key are compared to a constant.

Fixed by relaxing the check and set reverse traversal even when all
the secondary index keyparts are compared to a const.
Also account for the case when all the primary keys are compared to a
constant.
2007-09-14 17:43:14 +03:00
dkatz@damien-katzs-computer.local
f672f5dcd2 Merge dkatz@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  damien-katzs-computer.local:/Users/dkatz/mysql50
2007-09-05 15:08:30 -04:00
gkodinov/kgeorge@magare.gmz
625c44fe67 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30377-5.0-opt
2007-08-29 12:47:24 +03:00
mhansson/martin@linux-st28.site
f672e5bca6 Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bugx/my50-bugx
2007-08-29 10:49:19 +02:00
gkodinov/kgeorge@magare.gmz
acf0ebe69f Merge magare.gmz:/home/kgeorge/mysql/work/B30377-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B30377-5.1-opt
2007-08-29 11:38:05 +03:00
mhansson/martin@linux-st28.site
2df0485d93 Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  linux-st28.site:/home/martin/mysql/src/5.1o-bug30596
2007-08-28 18:17:44 +02:00
mhansson/martin@linux-st28.site
98d34d620c Bug #30596 GROUP BY optimization gives wrong result order
The optimization that uses a unique index to remove GROUP BY did not 
ensure that the index was actually used, thus violating the ORDER BY
that is implied by GROUP BY.
Fixed by replacing GROUP BY with ORDER BY if the GROUP BY clause contains
a unique index over non-nullable field(s). In case GROUP BY ... ORDER BY 
null is used, GROUP BY is simply removed.
2007-08-28 18:01:29 +02:00
gkodinov/kgeorge@magare.gmz
cfaa0983c8 Bug #30377: EXPLAIN loses last_query_cost when used with UNION
Currently the Last_query_cost session status variable shows
only the cost of a single flat subselect. For complex queries
(with subselects or unions etc) Last_query_cost is not valid
as it was showing the cost for the last optimized subselect.
Fixed by reseting to zero Last_query_cost when the complete
cost of the query cannot be determined.
Last_query_cost will be non-zero only for single flat queries.
2007-08-28 18:51:03 +03:00
mhansson/martin@linux-st28.site
a4d5d9204d Bug #30596 GROUP BY optimization gives wrong result order
The optimization that uses a unique index to remove GROUP BY, did not 
ensure that the index was actually used, thus violating the ORDER BY
that is impled by GROUP BY.
Fixed by replacing GROUP BY with ORDER BY if the GROUP BY clause contains
a unique index. In case GROUP BY ... ORDER BY null is used, GROUP BY is
simply removed.
2007-08-27 17:33:41 +02:00
gshchepa/uchum@gleb.loc
2adf3ee743 Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-08-25 23:28:23 +05:00
gshchepa/uchum@gleb.loc
ced93cb35e Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-08-25 22:32:18 +05:00
evgen@moonbone.local
36a2950016 sql_select.cc:
Additional fix for the bug#30245.
2007-08-25 17:32:17 +00:00
evgen@moonbone.local
2ee3efc240 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/30245-bug-5.0-opt-mysql
2007-08-24 22:11:23 +00:00
jani@a88-113-38-195.elisa-laajakaista.fi
b25dacbdee Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-08-24 15:25:02 +03:00
df@pippilotta.erinye.com
6d068a5ac7 Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
2007-08-24 10:13:03 +02:00
gshchepa@bk-internal.mysql.com
46e58466cb Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/users/gshchepa/mysql-5.1-opt
2007-08-23 21:38:24 +02:00
joerg@trift2.
d4d4f8528e Manual merge of parallel development in separate team trees. 2007-08-22 17:13:42 +02:00
jani@hynda.mysql.fi
6519de0469 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel
2007-08-22 17:29:38 +03:00
joerg@trift2.
20ce606797 Merge trift2.:/MySQL/M51/target-5.1.22
into  trift2.:/MySQL/M51/push-5.1

Includes manual merges.
2007-08-22 16:08:55 +02:00
jani@hynda.mysql.fi
2fd7a743e4 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel
2007-08-21 19:03:28 +03:00
gshchepa/uchum@gleb.loc
f5f65c40f1 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30287
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-08-21 19:46:29 +05:00
gshchepa/uchum@gleb.loc
c652d3df95 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30287
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-08-21 19:30:32 +05:00
gshchepa/uchum@gleb.loc
5d3809c264 Fixed bug #30287.
The server created temporary tables for filesort in the working directory
instead of the specified tmpdir directory.
2007-08-21 01:39:39 +05:00
malff/marcsql@weblab.(none)
1c27dd1d67 Merge weblab.(none):/home/marcsql/TREE/mysql-5.1-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge
2007-08-20 11:13:31 -06:00
evgen@moonbone.local
9a83ddda69 Bug#30245: A wrong type of a BIT field is reported when grouped by it.
HEAP tables can't index BIT fields. Due to this when grouping by such fields is
needed they are converted to a fields of the LONG type when temporary table
is being created. But a side effect of this is that a wrong type of BIT
fields is returned to a client.

Now the JOIN::prepare and the create_distinct_group functions are create
additional hidden copy of BIT fields to preserve original fields untouched.
New hidden fields are used for grouping instead.
2007-08-17 18:30:41 +04:00
igor@olga.mysql.com
ff3f6e806b Merge olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug30396
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.1-opt-bug30396
2007-08-16 17:22:50 -07:00
igor@olga.mysql.com
d790ec42e1 Fixed bug #30396.
The bug caused memory corruption for some queries with top OR level
in the WHERE condition if they contained equality predicates and 
other sargable predicates in disjunctive parts of the condition.

The corruption happened because the upper bound of the memory
allocated for KEY_FIELD and SARGABLE_PARAM internal structures
containing info about potential lookup keys was calculated incorrectly
in some cases. In particular it was calculated incorrectly when the
WHERE condition was an OR formula with disjuncts being AND formulas
including equalities and other sargable predicates.
2007-08-15 10:24:18 -07:00
kostja@bodhi.(none)
2537a87fb5 Provide initial module structure to Doxygen. 2007-08-15 19:08:44 +04:00
monty@narttu.mysql.fi
9d609a59fd Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2007-08-14 00:22:34 +03:00
monty@mysql.com/nosik.monty.fi
e53a73e26c Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris
Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db

I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read()      -> index_read_map()
index_read_idx()  -> index_read_idx_map()
index_read_last() -> index_read_last_map()
2007-08-13 16:11:25 +03:00
gshchepa/uchum@gleb.loc
db6ec3f71f Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-08-11 02:00:51 +05:00
igor@olga.mysql.com
a5e4e70100 Merge olga.mysql.com:/home/igor/mysql-5.1
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.1-opt-merge
2007-08-04 22:36:54 -07:00
igor@olga.mysql.com
fd3be5034e Removed warnings after fix for bug 28404. 2007-08-04 20:31:48 -07:00