Commit graph

37160 commits

Author SHA1 Message Date
kostja@bodhi.(none)
7989c712a6 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime
2007-07-16 23:41:28 +04:00
kostja@bodhi.(none)
1ecb226efa Bug#29050 Creation of a legal stored procedure fails if a database is not
selected prior: ensure the fix also works for information_schema
tables.
2007-07-16 23:37:02 +04:00
dfischer/mysqldev@mysql.com/production.mysql.com
c04ae188f5 Raise version number after cloning 5.0.46 2007-07-16 12:42:12 +02:00
kostja@bodhi.(none)
5466b0df14 Add a teste case for Bug#27296 "Assertion in ALTER TABLE SET DEFAULT in
Linux Debug build (possible deadlock)"

The bug is not repeatable any more.
2007-07-15 13:34:35 +04:00
kostja@bodhi.(none)
6c152b29f2 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime
2007-07-12 23:22:17 +04:00
kostja@bodhi.(none)
366b761f91 Apply community contributed fix for Bug#13326 SQLPS statement logging is
incomplete in 5.0 (and review fixes).

When in 5.0.13 I introduced class Prepared_statement and methods
::prepare and ::execute, general logging was left out of this class.
This was good for stored procedures, since in stored procedures
we do not log sub-statements, but introduced a regression in case of SQL
syntax for prepared statements, as previously we would log the actual
statements to the log, and after the change we would log only
COM_QUERY text.

Restore the old behavior, but still suppress logging if inside a stored 
procedure.

Based on a community contributed patch from Vladimir Shebordaev.

No test case since we do not have a mechanism to test output
of the general log.
2007-07-12 23:14:00 +04:00
kostja@bodhi.(none)
675a4e8f7b Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  bodhi.(none):/opt/local/work/mysql-5.0-26141-final
2007-07-12 22:28:13 +04:00
kostja@bodhi.(none)
5ab4b6f1ac A fix and a test case for Bug#26141 mixing table types in trigger
causes full table lock on innodb table.
Also fixes Bug#28502 Triggers that update another innodb table 
will block on X lock unnecessarily (duplciate).
Code review fixes.

Both bugs' synopses are misleading: InnoDB table is
not X locked. The statements, however, cannot proceed concurrently, 
but this happens due to lock conflicts for tables used in triggers,
not for the InnoDB table. 

If a user had an InnoDB table, and two triggers, AFTER UPDATE and 
AFTER INSERT, competing for different resources (e.g. two distinct
MyISAM tables), then these two triggers would not be able to execute
concurrently. Moreover, INSERTS/UPDATES of the InnoDB table would
not be able to run concurrently. 
The problem had other side-effects (see respective bug reports).

This behavior was a consequence of a shortcoming of the pre-locking
algorithm, which would not distinguish between different DML operations
(e.g. INSERT and DELETE) and pre-lock all the tables
that are used by any trigger defined on the subject table.

The idea of the fix is to extend the pre-locking algorithm to keep track,
for each table, what DML operation it is used for and not
load triggers that are known to never be fired.
2007-07-12 22:26:41 +04:00
thek@adventure.(none)
825b5096ad Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
2007-07-12 15:38:23 +02:00
thek@adventure.(none)
2a5e7fe592 Merge adventure.(none):/home/thek/Development/cpp/bug28249/my50-bug28249
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
2007-07-12 15:30:34 +02:00
thek@adventure.(none)
8ee7e48de8 Bug#28249 Query Cache returns wrong result with concurrent insert / certain lock
A race condition in the integration between MyISAM and the query cache code 
caused the query cache to fail to invalidate itself on concurrently inserted
data.

This patch fix this problem by using the existing handler interface which, upon
each statement cache attempt, compare the size of the table as viewed from the 
cache writing thread and with any snap shot of the global table state. If the
two sizes are different the global table size is unknown and the current
statement can't be cached.
2007-07-12 13:29:51 +02:00
kostja@bodhi.(none)
3364066e29 A fix and a test case for Bug#25859 ALTER DATABASE works w/o parameters.
Fix the parser to make the database options not optional.
2007-07-12 01:10:29 +04:00
tsmith@sita.local
06c8087070 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sita.local:/Users/tsmith/m/bk/maint/50
2007-07-09 15:38:36 -06:00
tsmith@sita.local
4b1da38b13 rpl_misc_functions.result, rpl_misc_functions.test:
Backport from 5.1 a fix to make this test deterministic
2007-07-09 13:18:27 -06:00
tsmith@sita.local
1e0d809992 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sita.local:/Users/tsmith/m/bk/maint/50
2007-07-09 10:32:04 -06:00
tomas@whalegate.ndb.mysql.com
81eb732880 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-maint
2007-07-09 12:05:07 +02:00
tsmith@sita.local
00c6793075 Merge sita.local:/Users/tsmith/m/bk/maint/41
into  sita.local:/Users/tsmith/m/bk/maint/50
2007-07-09 01:47:33 -06:00
tsmith@sita.local
7b2b10e462 Merge sita.local:/Users/tsmith/m/bk/50
into  sita.local:/Users/tsmith/m/bk/maint/50
2007-07-09 01:22:54 -06:00
tsmith@sita.local
1106dddfa2 Merge sita.local:/Users/tsmith/m/bk/41
into  sita.local:/Users/tsmith/m/bk/maint/41
2007-07-09 01:21:22 -06:00
tsmith@sita.local
75810fbc22 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sita.local:/Users/tsmith/m/bk/maint/50
2007-07-09 01:14:33 -06:00
ramil/ram@ramil.myoffice.izhnet.ru
a10759d070 Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b28808/b28808.5.0
2007-07-09 10:17:04 +05:00
tsmith@sita.local
c2092ee91b Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sita.local:/Users/tsmith/m/bk/maint/50
2007-07-08 19:39:54 -06:00
gshchepa/uchum@gleb.loc
b1d230e09f Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-08 11:46:52 +05:00
igor@olga.mysql.com
e1eababbba Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug29417
2007-07-07 15:45:28 -07:00
gshchepa/uchum@gleb.loc
6aa9e3a4fc Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-08 03:40:01 +05:00
gshchepa/uchum@gleb.loc
33b64dc989 Merge gleb.loc:/home/uchum/work/bk/4.1-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-08 03:25:39 +05:00
igor@olga.mysql.com
63d538575b Fixed bug #29417.
An assertion abort could occur for some grouping queries that employed 
decimal user variables with assignments to them.

The problem appeared the constructors of the class Field_new_decimal
because the function my_decimal_length_to_precision did not guarantee
returning decimal precision not greater than DECIMAL_MAX_PRECISION.
2007-07-07 12:31:55 -07:00
gshchepa/uchum@gleb.loc
3c918268e7 Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-08 00:19:31 +05:00
gshchepa/uchum@gleb.loc
8c8b64797a Merge gleb.loc:/home/uchum/work/bk/4.1
into  gleb.loc:/home/uchum/work/bk/4.1-opt
2007-07-08 00:15:53 +05:00
igor@olga.mysql.com
87c3d18f6f Fixed bug #29415.
The cast operation ignored the cases when the precision and/or the scale exceeded
the limits, 65 and 30 respectively. No errors were reported in these cases.
For some queries this may lead to an assertion abort.

Fixed by throwing errors for such cases.
2007-07-07 10:33:02 -07:00
knielsen@ymer.(none)
db649ad5d1 Bug #29543 GCov information not written in case of crash.
For GCov builds, if the server crashes, the normal exit handler for writing
coverage information is not executed due to the abnormal termination.

Fix this by explicitly calling the __gcov_flush function in our crash handler.
2007-07-07 07:46:17 +02:00
tsmith@sita.local
c886138da4 Merge sita.local:/Users/tsmith/m/bk/maint/41
into  sita.local:/Users/tsmith/m/bk/maint/50
2007-07-06 19:03:35 -06:00
tsmith@sita.local
165c947e0f Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  sita.local:/Users/tsmith/m/bk/maint/50
2007-07-06 17:55:46 -06:00
tsmith@sita.local
781a04930c Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  sita.local:/Users/tsmith/m/bk/maint/41
2007-07-06 17:54:25 -06:00
tsmith@sita.local
91e406ebed Merge sita.local:/Users/tsmith/m/bk/50
into  sita.local:/Users/tsmith/m/bk/maint/50
2007-07-06 17:50:01 -06:00
antony@ppcg5.local
edc4f4b3a6 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0-engines.merge
2007-07-06 14:29:58 -07:00
antony@ppcg5.local
1988c1c668 fix test for bug29299 2007-07-06 11:35:10 -07:00
antony@ppcg5.local
4632a1c44b Merge ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-4.1-engines.merge
into  ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0-engines.merge
2007-07-06 09:02:36 -07:00
antony@ppcg5.local
2b52524ea5 Merge anubis.xiphis.org:/usr/home/antony/work/mysql-5.0-engines
into  anubis.xiphis.org:/usr/home/antony/work/mysql-5.0-engines.merge
2007-07-06 09:00:40 -07:00
antony@ppcg5.local
bab42982bc Merge anubis.xiphis.org:/usr/home/antony/work/mysql-4.1-engines
into  anubis.xiphis.org:/usr/home/antony/work/mysql-4.1-engines.merge
2007-07-06 08:57:18 -07:00
kostja@bodhi.(none)
392b283f3d Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime
2007-07-06 16:22:11 +04:00
kostja@bodhi.(none)
a33bc2c247 Remove typedef st_table_list TABLE_LIST and always use name 'TABLE_LIST'.
The need arose when working on Bug 26141, where it became
necessary to replace TABLE_LIST with its forward declaration in a few
headers, and this involved a lot of s/TABLE_LIST/st_table_list/.
Although other workarounds exist, this patch is in line
with our general strategy of moving away from typedef-ed names.
Sometime in future we might also rename TABLE_LIST to follow the
coding style, but this is a huge change.
2007-07-06 16:18:49 +04:00
jani@labbari.dsl.inet.fi
7d7524d94d Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0
into  labbari.dsl.inet.fi:/home/my/bk/mysql-5.0-marvel
2007-07-06 09:51:02 +03:00
igor@olga.mysql.com
5b1e1eeae5 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug29392
2007-07-05 17:39:51 -07:00
gshchepa/uchum@gleb.loc
0b00ebbba0 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-06 03:49:40 +05:00
gshchepa/uchum@gleb.loc
c33f4d3d85 Fixed bug #29442.
The SELECT INTO OUTFILE FIELDS ENCLOSED BY digit or minus sign,
followed by the same LOAD DATA INFILE statement, used wrond encoding
of non-string fields contained the enclosed character in their text
representation.

Example:
  SELECT 15, 9 INTO OUTFILE 'text' FIELDS ENCLOSED BY '5';

Old encoded result in the text file:
  5155 595
         ^ was decoded as the 1st enclosing character of the 2nd field;
        ^ was skipped as garbage;
  ^    ^ was decoded as a pair of englosing characters of the 1st field;
      ^   was decoded as traling space of the first field;
    ^^ was decoded as a doubled enclosed character.

New encoded result in the text file:
  51\55 595
  ^   ^ pair of enclosing characters of the 1st field;
    ^^ escaped enclosed character.
2007-07-06 03:43:23 +05:00
gkodinov/kgeorge@magare.gmz
1532452a00 Bug #29166:
AsText() needs to know the maximum number of
characters a IEEE double precision value can
occupy to make sure there's enough buffer space.
The number was too small to hold all possible
values and this caused buffer overruns.
Fixed by correcting the calculation of the 
maximum digits in a string representation of an
IEEE double precision value as printed by 
String::qs_append(double).
2007-07-05 18:24:48 +03:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
fca06fbc68 Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored
Problem: logging queries not using indexes we check a special flag which 
is set only at the server startup and is not changing with a corresponding
server variable together.

Fix: check the variable value instead of the flag.
2007-07-05 15:34:12 +05:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
483bd10de8 Fix for bug #29420: crash with show and purge binlogs
Problem: in case of failed 'show binlog events...' we don't inform that 
the log is not in use anymore. That may confuse following 'purge logs...'
command as it takes into account logs in use.

Fix: always notify that the log is not in use anymore.
2007-07-05 13:09:56 +05:00
kostja@bodhi.(none)
a7b05cb786 A fix and a test case for Bug#29050 Creation of a legal stored procedure
fails if a database is not selected prior.

The problem manifested itself when a user tried to
create a routine that had non-fully-qualified identifiers in its bodies
and there was no current database selected.

This is a regression introduced by the fix for Bug 19022:

The patch for Bug 19022 changes the code to always produce a warning
if we can't resolve the current database in the parser. 
In this case this was not necessary, since even though the produced
parsed tree was incorrect, we never re-use sphead
that was obtained at first parsing of CREATE PROCEDURE.
The sphead that is anyhow used is always obtained through db_load_routine,
and there we change the current database to sphead->m_db before
calling yyparse.

The idea of the fix is to resolve the current database directly using 
lex->sphead->m_db member when parsing a stored routine body, when
such is present.

This patch removes the need to reset the current database
when loading a trigger or routine definition into SP cache.
The redundant code will be removed in 5.1.
2007-07-05 11:34:04 +04:00