Commit graph

1155 commits

Author SHA1 Message Date
jani@a88-113-38-195.elisa-laajakaista.fi
090d1396cf 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
2008-03-28 12:14:27 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
0c59da1ca2 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
2008-03-26 12:32:27 +02:00
istruewing@stella.local
44fbe74e1e Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg
2008-03-26 10:27:00 +01:00
mkindahl@dl145h.mysql.com
9baeb72ee6 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
2008-03-14 18:32:01 +01:00
istruewing@stella.local
eabe082d6f Manual merge 2008-03-14 12:02:11 +01:00
jani@a88-113-38-195.elisa-laajakaista.fi
74cbd71e94 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
2008-03-13 23:35:52 +02:00
kaa@kaamos.(none)
0a7052e4d3 Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-03-12 11:19:46 +03:00
antony@pcg5ppc.xiphis.org
820068f1b7 Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines
into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.1
2008-03-07 13:46:29 -08:00
svoj@mysql.com/june.mysql.com
553d70d0ee BUG#34656 - KILL a query = Assertion failed: m_status == DA_ERROR ||
m_status == DA_OK

Reading from information_scema.tables or information_schema.columns
may cause assertion failure in debug builds. This may happen under
rare circumstances when information_schema fails to get information
about a table (e.g. when a connection is killed).

This happens because open_normal_and_derived_tables() can return an
error without setting an error message in THD. But information_schema
attempts to get an error message from THD unconditionally.

With this fix information_schema attempts to get an error message
from THD only in case error message is set in THD.
2008-03-07 18:41:50 +04:00
sven@riska.(none)
81b1d712bf BUG#31168: @@hostname does not replicate
Problem: in mixed and statement mode, a query that refers to a
system variable will use the slave's value when replayed on
slave. So if the value of a system variable is inserted into a
table, the slave will differ from the master.
Fix: mark statements that refer to a system variable as "unsafe",
meaning they will be replicated by row in mixed mode and produce a warning
in statement mode. There are some exceptions: some variables are actually
replicated. Those should *not* be marked as unsafe.
BUG#34732: mysqlbinlog does not print default values for auto_increment variables
Problem: mysqlbinlog does not print default values for some variables,
including auto_increment_increment and others. So if a client executing
the output of mysqlbinlog has different default values, replication will
be wrong.
Fix: Always print default values for all variables that are replicated.
I need to fix the two bugs at the same time, because the test cases would
fail if I only fixed one of them.
2008-03-07 13:59:36 +01:00
jani@a88-113-38-195.elisa-laajakaista.fi
ab013df080 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
2008-03-07 11:25:47 +02:00
davi@buzz.(none)
2905909d89 Merge buzz.(none):/home/davi/mysql-5.0-runtime
into  buzz.(none):/home/davi/mysql-5.1-runtime
2008-02-28 20:22:50 -03:00
davi@mysql.com/endora.local
361262c7c0 Bug#33851 Passing UNSIGNED param to EXECUTE returns ERROR 1210
The problem is that passing anything other than a integer to a limit
clause in a prepared statement would fail. This limitation was introduced
to avoid replication problems (e.g: replicating the statement with a
string argument would cause a parse failure in the slave).

The solution is to convert arguments to the limit clause to a integer
value and use this converted value when persisting the query to the log.
2008-02-28 11:34:08 -03:00
tnurnberg@white.intern.koehntopp.de
1759c97df2 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/misc/mysql/20752/51-20752
2008-02-24 01:35:50 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
1ed076e41b Bug#20752: BENCHMARK with many iterations returns too quickly
In BENCHMARK(count, expr), count could overflow/wrap-around.
Patch changes to a sufficiently large data-type. Adds a warning
for negative count values.
2008-02-24 01:31:54 +01: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
kaa@kaamos.(none)
58240614f7 Merge kaamos.(none):/data/src/opt/bug31236/my51-bug31236
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-02-20 00:37:51 +03:00
kaa@kaamos.(none)
8d222210c7 Fix for bug #31236: Inconsistent division by zero behavior for
floating point numbers

Some math functions did not check if the result is a valid number
(i.e. neither of +-inf or nan).

Fixed by validating the result where necessary and returning NULL in
case of invalid result.
2008-02-20 00:33:43 +03:00
kaa@kaamos.(none)
5647dee192 Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-02-17 14:57:01 +03:00
ramil/ram@ramil.myoffice.izhnet.ru
0f30fa7218 Merge mysql.com:/home/ram/work/b33304/b33304.5.0
into  mysql.com:/home/ram/work/b33304/b33304.5.1
2008-02-16 15:02:49 +04:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
fe6d4aef3a Fix for bug #33304: Test 'func_group' hangs on Mac OS X 10.4 PowerPC 64-bit
Problem: SLEEP(0) never returns on 64-bit Mac OS X due to a bug in 
pthread_cond_timedwait().

Fix: when given a very short timeout just return immediately.
2008-02-15 16:03:54 +04:00
kaa@kaamos.(none)
9f194149b8 Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-02-13 12:12:00 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
4f98f3e683 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
2008-02-08 12:13:33 +01: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
tsmith@ramayana.hindu.god
3906cc27d7 Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2008-01-25 10:37:29 -07:00
mhansson/martin@linux-st28.site
f8fb6e930a Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  linux-st28.site:/home/martin/mysql/src/bug33143/my51-bug33143-pushee
2008-01-17 18:36:04 +01:00
mhansson/martin@linux-st28.site
2067dfe474 Merge linux-st28.site:/home/martin/mysql/src/bug33143/my50-bug33143-again
into  linux-st28.site:/home/martin/mysql/src/bug33143/my51-bug33143
2008-01-17 18:22:55 +01: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
serg@janus.mylan
d9ca7b670e Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-12-20 22:11:37 +01:00
cmiller@zippy.cornsilk.net
edbacd3a99 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-forcollapseandmerge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
2007-12-14 13:42:09 -05: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
anozdrin/alik@station.
151444c626 Merge station.:/mnt/raid/alik/MySQL/devel/5.1
into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt
2007-12-14 16:30:22 +03:00
gluh@eagle.(none)
4f5868114a Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-12-13 15:56:04 +04:00
gluh@eagle.(none)
e039595029 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-12-13 14:52:49 +04:00
kostja@bodhi.(none)
ebb9c5d983 Bug#12713 "Error in a stored function called from a SELECT doesn't
cause ROLLBACK of statement", part 1. Review fixes.

Do not send OK/EOF packets to the client until we reached the end of 
the current statement.
This is a consolidation, to keep the functionality that is shared by all 
SQL statements in one place in the server.
Currently this functionality includes:
- close_thread_tables()
- log_slow_statement().

After this patch and the subsequent patch for Bug#12713, it shall also include:
- ha_autocommit_or_rollback()
- net_end_statement()
- query_cache_end_of_result().

In future it may also include:
- mysql_reset_thd_for_next_command().
2007-12-12 18:21:01 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
0d63a0d63f 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-12-07 22:27:48 +02:00
evgen@moonbone.local
f1bff761d9 Bug#32482: Crash for a query with ORDER BY a user variable.
The Item_func_set_user_var::register_field_in_read_map() did not check 
that the result_field was null.This caused server crashes for queries that
required order by such a field and were executed without using a temporary
table.

The Item_func_set_user_var::register_field_in_read_map() now checks the
result_field to be not null.
2007-12-07 22:54:47 +03:00
tnurnberg@white.intern.koehntopp.de
987ec3f306 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31177/50-31177
2007-12-06 08:46:01 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
b1e77cfc31 Bug#31177: Server variables can't be set to their current values
additional fixes for BDB and correct assignment of both signed
and unsigned 64-bit data to unsigned system variables
2007-12-06 01:28:01 +01:00
malff@lambda.hsd1.co.comcast.net.
4e8f8a0178 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-11-28 07:42:36 -07:00
gkodinov/kgeorge@magare.gmz
0f3db011d5 Merge magare.gmz:/home/kgeorge/mysql/work/B30355-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B30355-5.1-opt
2007-11-27 17:19:51 +02:00
gkodinov/kgeorge@magare.gmz
8c3d5135ba Bug #30355: Incorrect ordering of UDF results
There's currently no way of knowing the determinicity of an UDF.
And the optimizer and the sequence() UDFs were making wrong
assumptions about what the is_const member means.
Plus there was no implementation of update_system_tables()
causing the optimizer to overwrite the information returned by
the <udf>_init function.

Fixed by equating the assumptions about the semantics of 
is_const and providing a implementation of update_used_tables().
Added a TODO item for the UDF API change needed to make a better 
implementation.
2007-11-27 17:16:52 +02:00
thek@adventure.(none)
a0be47a740 Merge adventure.(none):/home/thek/Development/cpp/bug32436/my51-bug32436
into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
2007-11-26 15:59:09 +01:00
thek@adventure.(none)
0ca073c610 Merge adventure.(none):/home/thek/Development/cpp/bug32436/my50-bug32436
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
2007-11-26 15:58:06 +01:00
thek@adventure.(none)
ce98e49635 Merge adventure.(none):/home/thek/Development/cpp/bug32436/my50-bug32436
into  adventure.(none):/home/thek/Development/cpp/bug32436/my51-bug32436
2007-11-26 15:45:13 +01:00
thek@adventure.(none)
95bfde3d01 Bug #32436 KILL QUERY completely deadlocks mysqld
Sending several "KILL QUERY" statements to target a connection running
"SELECT SLEEP" could freeze the server.

The locking order in Item_func_sleep was wrong and this could lead to a
dead lock.

This patch solves the issue by resolving the locking order properly.
2007-11-26 15:44:05 +01:00
jani@hynda.mysql.fi
2e034c1e3b Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel
2007-11-26 11:27:01 +02:00
istruewing@stella.local
89bb56cdbe Merge stella.local:/home2/mydev/mysql-5.1-ateam
into  stella.local:/home2/mydev/mysql-5.1-axmrg
2007-11-17 09:21:09 +01:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
11115f1bfd Fix for bug #32260: User variables in query cause server crash
Problem: there's no guarantee that the user variable item's result_field
is assigned when we're adjusting its table read map.
  
Fix: check the result_field before using it.
2007-11-17 11:20:50 +04:00