Commit graph

34879 commits

Author SHA1 Message Date
anozdrin/alik@alik.opbmk
a9e8d461e3 Fix result file. 2007-02-23 21:13:21 +03:00
anozdrin/alik@alik.opbmk
0be4589311 Fix test for views with national characters,
which accidentally got broken during the merge
on 16-Feb-2007.
2007-02-23 20:49:01 +03:00
anozdrin/alik@alik.opbmk
8f5c21172c BUG#24415: im_daemon_life_cycle.imtest fails
Fix timeouts. Only test suite is changed.
2007-02-23 20:24:32 +03:00
anozdrin/alik@alik.opbmk
76f813a52e Fix for BUG#24415: Instance manager test im_daemon_life_cycle fails randomly.
The cause of im_daemon_life_cycle.imtest random failures was the following
behaviour of some implementations of LINUX threads: let's suppose that a
process has several threads (in LINUX threads, there is a separate process for
each thread). When the main process gets killed, the parent receives SIGCHLD
before all threads (child processes) die. In other words, the parent receives
SIGCHLD, when its child is not completely dead.

In terms of IM, that means that IM-angel receives SIGCHLD when IM-main is not dead
and still holds some resources. After receiving SIGCHLD, IM-angel restarts
IM-main, but IM-main failed to initialize, because previous instance (copy) of
IM-main still holds server socket (TCP-port).

Another problem here was that IM-angel restarted IM-main only if it was killed
by signal. If it exited with error, IM-angel thought it's intended / graceful
shutdown and exited itself.

So, when the second instance of IM-main failed to initialize, IM-angel thought
it's intended shutdown and quit.

The fix is
  1. to change IM-angel so that it restarts IM-main if it exited with error code;
  2. to change IM-main so that it returns proper exit code in case of failure.
2007-02-20 22:31:50 +03:00
thek@kpdesk.mysql.com
3c88372a1e Merge kpdesk.mysql.com:/home/thek/dev/bug23240/my50-bug23240
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-runtime
2007-02-19 15:24:01 +01:00
thek@kpdesk.mysql.com
19dfc42eb6 Bug#23240 --init_file statements with NOW() reports '1970-01-01 11:00:00'as the date time
- Starting time of a query sent by bootstrapping wasn't initialized
  and starting time defaulted to 0. This later used value by NOW-
  item and was translated to 1970-01-01 11:00:00.
- Marketing the time with thd->set_time() before the call to
  mysql_parse resolves this issue.
- set_time was refactored to be part of the thd->init_for_queries-
  process.
2007-02-19 14:57:54 +01:00
thek@kpdesk.mysql.com
d6062a51e5 Merge kpdesk.mysql.com:/home/thek/dev/bug23240/my41-bug23240
into  kpdesk.mysql.com:/home/thek/dev/bug23240/my50-bug23240
2007-02-19 10:08:27 +01:00
thek@kpdesk.mysql.com
dd41fd5732 Bug#23240 --init-file statements with NOW() reports '1970-01-01 11:00:00'as the date time
- Starting time of a query sent by file bootstrapping wasn't initialized
  and starting time defaulted to 0. This later used value by the Now-
  item and is translated to 1970-01-01 11:00:00.
- marking the time with thd->set_time() before the call to 
  mysql_parse resolves this issue.
2007-02-19 09:37:34 +01:00
malff/marcsql@weblab.(none)
0bf1b708f3 Manual merge 2007-02-16 13:42:52 -07:00
malff/marcsql@weblab.(none)
f8839a70bd Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-rt-merge
2007-02-16 09:02:02 -07:00
cmiller@zippy.cornsilk.net
154f7f396e Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2007-02-14 10:47:39 -05:00
igor@olga.mysql.com
c84ee7079c Post-merge fix 2007-02-13 15:49:42 -08:00
ibabaev@bk-internal.mysql.com
266300142e Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
2007-02-13 23:35:06 +01:00
cmiller@zippy.cornsilk.net
9e9dd4327c Bug#25807: LOAD DATA INFILE does not work with Pipes
Showstopper and regression against 5.0.24.

Previously, we ignored seek() errors (see Bug#22828) and let seek()s
against pipes fail.  Now, since we check that a seek didn't fail,
and return without reading, this bug popped up.

This restores the behavior for file-ish objects that could never be 
seek()ed.
2007-02-13 16:35:29 -05:00
cmiller@zippy.cornsilk.net
6473de8db1 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2007-02-13 10:02:00 -05:00
msvensson@pilot.mysql.com
7dcdbdf37b Merge pilot.mysql.com:/home/msvensson/mysql/mysql-5.0
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
2007-02-13 10:00:53 +01:00
msvensson@pilot.mysql.com
818cb094fc Merge pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
2007-02-13 09:56:56 +01:00
igor@olga.mysql.com
0461228a70 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26209
2007-02-12 23:10:33 -08:00
holyfoot/hf@mysql.com/hfmain.(none)
30614d22c1 Merge mysql.com:/home/hf/work/20691/my50-20691
into  mysql.com:/home/hf/work/25492/my50-25492
2007-02-13 01:23:23 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
fb4ad23994 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/25492/my50-25492
2007-02-13 01:20:02 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
74cbe92c6b Merge mysql.com:/home/hf/work/25492/my41-25492
into  mysql.com:/home/hf/work/25492/my50-25492
2007-02-13 00:59:30 +04:00
malff/marcsql@weblab.(none)
4e556b2305 Bug#24532 (The return data type of IS TRUE is different from similar
operations)

Before this change, the boolean predicates:
- X IS TRUE,
- X IS NOT TRUE,
- X IS FALSE,
- X IS NOT FALSE
were implemented by expanding the Item tree in the parser, by using a
construct like:
Item_func_if(Item_func_ifnull(X, <value>), <value>, <value>)

Each <value> was a constant integer, either 0 or 1.

A bug in the implementation of the function IF(a, b, c), in
Item_func_if::fix_length_and_dec(), would cause the following :

When the arguments b and c are both unsigned, the result type of the
function was signed, instead of unsigned.

When the result of the if function is signed, space for the sign could be
counted twice (in the max() expression for a signed argument, and in the
total), causing the member max_length to be too high.

An effect of this is that the final type of IF(x, int(1), int(1)) would be
int(2) instead of int(1).

With this fix, the problems found in Item_func_if::fix_length_and_dec()
have been fixed.

While it's semantically correct to represent 'X IS TRUE' with
Item_func_if(Item_func_ifnull(X, <value>), <value>, <value>),
there are however more problems with this construct.

a)
Building the parse tree involves :
- creating 5 Item instances (3 ints, 1 ifnull, 1 if),
- creating each Item calls my_pthread_getspecific_ptr() once in the operator
  new(size), and a second time in the Item::Item() constructor, resulting
  in a total of 10 calls to get the current thread.
Evaluating the expression involves evaluating up to 4 nodes at runtime.
This representation could be greatly simplified and improved.

b)
Transforming the parse tree internally with if(ifnull(...)) is fine as long
as this transformation is internal to the server implementation.
With views however, the result of the parse tree is later exposed by the
::print() functions, and stored as part of the view definition.
Doing this has long term consequences:

1)
The original semantic 'X IS TRUE' is lost, and replaced by the
if(ifnull(...)) expression. As a result, SHOW CREATE VIEW does not restore
the original code.

2)
Should a future version of MySQL implement the SQL BOOLEAN data type for
example, views created today using 'X IS NULL' can be exported using
mysqldump, and imported again. Such views would be converted correctly and
automatically to use a BOOLEAN column in the future version.
With 'X IS TRUE' and the current implementations, views using these
"boolean" predicates would not be converted during the export/import, and
would use integer columns instead.
The difference traces back to how SHOW CREATE VIEW preserves 'X IS NULL' but
does not preserve the 'X IS TRUE' semantic.

With this fix, internal representation of 'X IS TRUE' booleans predicates
has changed, so that:
- dedicated Item classes are created for each predicate,
- only 1 Item is created to represent 1 predicate
- my_pthread_getspecific_ptr() is invoked 1 time instead of 10
- SHOW CREATE VIEW preserves the original semantic, and prints 'X IS TRUE'.

Note that, because of the fix in Item_func_if, views created before this fix
will:
- correctly use a int(1) type instead of int(2) for boolean predicates,
- incorrectly print the if(ifnull(...), ...) expression in SHOW CREATE VIEW,
since the original semantic (X IS TRUE) has been lost.
- except for the syntax used in SHOW CREATE VIEW, these views will operate
properly, no action is needed.

Views created after this fix will operate correctly, and will preserve the
original code semantic in SHOW CREATE VIEW.
2007-02-12 13:59:29 -07:00
holyfoot/hf@mysql.com/hfmain.(none)
0004fa3c5b bug #25492 (Invalid deallocation in mysql_stmt_fetch) 2007-02-13 00:55:45 +04:00
gluh@mysql.com/eagle.(none)
674868dabf Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-02-12 19:36:47 +04:00
gluh@mysql.com/eagle.(none)
81d4297d60 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-02-12 19:29:20 +04:00
gluh@mysql.com/eagle.(none)
6caff6f708 valgrind error fix 2007-02-12 19:28:49 +04:00
gkodinov/kgeorge@macbook.gmz
35a84c0aa6 Fixed MacOSX/Intel linking problem
Common symbols with and without initialization
 cause the apple linker to exclude then from the
 list of global symbols.
2007-02-12 16:02:53 +02:00
tnurnberg@mysql.com/sin.azundris.com
293352cbe4 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/tnurnberg/24660/50-24660
2007-02-12 14:49:34 +01:00
tnurnberg@mysql.com/sin.azundris.com
8dc8e07fcf Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/home/tnurnberg/24660/41-24660
2007-02-12 14:39:45 +01:00
tnurnberg@mysql.com/sin.azundris.com
ed82b013b8 Merge mysql.com:/home/tnurnberg/24660/41-24660
into  mysql.com:/home/tnurnberg/24660/50-24660
2007-02-12 14:32:06 +01:00
tnurnberg@mysql.com/sin.azundris.com
db7ac2c0c7 Bug#24660: "enum" field type definition problem
ENUMs weren't allowed to have character 0xff, a perfectly good character in some locales.
This was circumvented by mapping 0xff in ENUMs to ',', thereby prevent actual commas from
being used. Now if 0xff makes an appearance, we find a character not used in the enum and
use that as a separator. If no such character exists, we throw an error.

Any solution would have broken some sort of existing behaviour. This solution should
serve both fractions (those with 0xff and those with ',' in their enums), but
WILL REQUIRE A DUMP/RESTORE CYCLE FROM THOSE WITH 0xff IN THEIR ENUMS. :-/
That is, mysqldump with their current server, and restore when upgrading to one with
this patch.
2007-02-12 14:31:44 +01:00
gluh@mysql.com/eagle.(none)
47e537b47c Bug#24630 Subselect query crashes mysqld
The crash happens because second filling of the same I_S table happens in
case of subselect with order by. table->sort.io_cache previously allocated
in create_sort_index() is deleted during second filling
(function get_schema_tables_result). There are two places where
I_S table can be filled: JOIN::exec and create_sort_index().
To fix the bug we should check if the table was already filled
in one of these places and skip processing of the table in second.
2007-02-12 16:06:14 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
8299b596ae bug #20691 (INSERT (DEFAULT) may insert garbage with NO DEFAULT NOT NULL field)
Some fields (GEOMETRY first of all) can't be handled properly in this
case at all. So we return an error in this case
2007-02-12 15:41:36 +04:00
igor@olga.mysql.com
0583c7c524 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26159
2007-02-11 22:48:40 -08:00
igor@olga.mysql.com
4b1a1d9eb7 Fixed bug #26209.
The function make_unireg_sortorder ignored the fact that any
view field is represented by a 'ref' object.
This could lead to wrong results for the queries containing
both GROUP BY and ORDER BY clauses.
2007-02-11 19:36:46 -08:00
evgen@moonbone.local
ffdf7b159b sql_view.cc:
Post fix for bug#12122.
information_schema.result:
  Corrected test case after fixing bug#12122.
2007-02-11 22:52:12 +03:00
evgen@moonbone.local
9e2a0c7528 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/12122-bug-5.0-opt-mysql
2007-02-11 21:03:40 +03:00
igor@olga.mysql.com
976e747aaf Fixed bug #26159.
A wrong order of statements in QUICK_GROUP_MIN_MAX_SELECT::reset
caused a crash when a query with DISTINCT was executed by a loose scan
for an InnoDB table that had been emptied.
2007-02-10 23:55:56 -08:00
evgen@moonbone.local
a241446362 Bug#12122: The MERGE algorithm isn't applicable if the ORDER BY clause is
present.

A view created with CREATE VIEW ... ORDER BY ... cannot be resolved with
the MERGE algorithm, even when no other part of the CREATE VIEW statement
would require the view to be resolved using the TEMPTABLE algorithm.

The check for presence of the ORDER BY clause in the underlying select is 
removed from the st_lex::can_be_merged() function.
The ORDER BY list of the underlying select is appended to the ORDER BY list
2007-02-10 00:00:07 +03:00
igor@olga.mysql.com
3fe9de2879 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26017
2007-02-09 12:58:35 -08:00
igor@olga.mysql.com
951fe3cade Fixed bug #26017.
Objects of the class Item_equal contain an auxiliary member
eval_item of the type cmp_item that is used only for direct 
evaluation of multiple equalities. Currently a multiple equality
is evaluated directly only in the cases when the equality holds
at most for one row in the result set.
The compare collation of eval_item was determined incorectly.
It could lead to returning incorrect results for some queries.
2007-02-09 12:54:50 -08:00
evgen@moonbone.local
380c220545 Bug#23170: LAST_INSERT_ID isn't reset to 0 in INSERT .. SELECT when no rows were
inserted.

The select_insert::send_eof() function now resets LAST_INSERT_ID variable if
no rows were inserted.
2007-02-09 22:25:09 +03:00
joerg@trift2.
7a87a3c416 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-02-09 12:53:53 +01:00
gkodinov/kgeorge@macbook.gmz
a119169bf0 Merge bk-internal:/home/bk/mysql-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B22344-5.0-opt
2007-02-09 11:07:35 +02:00
gkodinov/kgeorge@macbook.gmz
053f7a42e6 Addendum to fix of bug #22344 : removed dead code. 2007-02-09 11:05:23 +02:00
kent@mysql.com/kent-amd64.(none)
3bb1114647 make_binary_distribution.sh:
Copy "ndb_size.tmpl" into binary distribution (Bug#24191)
2007-02-09 00:10:40 +01:00
tsmith@siva.hindu.god
4211f6d7d7 Merge siva.hindu.god:/home/tsmith/m/bk/50
into  siva.hindu.god:/home/tsmith/m/bk/maint/50
2007-02-08 16:01:45 -07:00
tsmith@siva.hindu.god
4579445b2a Merge siva.hindu.god:/home/tsmith/m/bk/41
into  siva.hindu.god:/home/tsmith/m/bk/maint/41
2007-02-08 16:01:13 -07:00
gluh@mysql.com/eagle.(none)
826178b0f2 Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-02-08 15:34:53 +04:00
gluh@mysql.com/eagle.(none)
e88351294b Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-02-08 15:34:22 +04:00