Commit graph

49442 commits

Author SHA1 Message Date
malff/marcsql@weblab.(none)
635f31822f Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-30712
2007-08-31 16:04:36 -06:00
malff/marcsql@weblab.(none)
143d8e460e Fixed timing issues in events.test 2007-08-31 15:51:57 -06:00
anozdrin/alik@ibm.opbmk
136a5412e9 Eliminate compile warnings. 2007-09-01 00:12:00 +04:00
anozdrin/alik@ibm.opbmk
0261d2d9db Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  ibm.opbmk:/home/alik/Documents/MySQL/devel/5.1-rt-bug25843
2007-08-31 22:13:27 +04:00
anozdrin/alik@ibm.opbmk
d6f94b062c Fix for BUG#25843: changing default database between PREPARE and EXECUTE
of statement breaks binlog.

There were two problems discovered by this bug:

  1. Default (current) database is not fixed at the creation time.
     That leads to wrong output of DATABASE() function.

  2. Database attributes (@@collation_database) are not fixed at
     the creation time. That leads to wrong resultset.

Binlog breakage and Query Cache wrong output happened because of
the first problem.

The fix is to remember the current database at the PREPARE-time and
set it each time at EXECUTE.
2007-08-31 20:42:14 +04:00
malff/marcsql@weblab.(none)
a2ae41129f Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-cleanup
2007-08-31 08:51:31 -06:00
malff/marcsql@weblab.(none)
e5ac5a0881 Test cleanup for events.test 2007-08-31 08:49:49 -06:00
kostja@bodhi.(none)
467de3981b Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-12713-new
2007-08-31 10:58:02 +04:00
kostja@bodhi.(none)
8d1af60da0 Never access thd->ha_data directly, use getters/setters from the plugin
API instead.
This is a pre-requisite of the fix for Bug 12713, which changes the
data type of thd->ha_data from void * to struct Ha_data.
2007-08-31 10:19:52 +04:00
malff/marcsql@weblab.(none)
4cab11097e Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge
2007-08-30 17:05:49 -06:00
malff/marcsql@weblab.(none)
2482c59740 Merge weblab.(none):/home/marcsql/TREE/mysql-5.1-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge
2007-08-30 13:23:59 -06:00
davi@moksha.local
37d48bfe30 Post-merge test case with wait_condition for Bug#28587 2007-08-30 16:19:23 -03:00
davi@moksha.local
11830073bc Merge moksha.local:/Users/davi/mysql/push/bugs/28587-5.0
into  moksha.local:/Users/davi/mysql/push/bugs/28587-5.1
2007-08-30 16:13:07 -03:00
davi@moksha.local
1180c22aef Bug#28587 SELECT is blocked by INSERT waiting on read lock, even with low_priority_updates
The problem is that a SELECT on one thread is blocked by INSERT ... ON
DUPLICATE KEY UPDATE on another thread even when low_priority_updates is
activated.

The solution is to possibly downgrade the lock type to the setting of
low_priority_updates if the INSERT cannot be concurrent.
2007-08-30 16:11:53 -03:00
malff/marcsql@weblab.(none)
7ed3555c67 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge
2007-08-30 12:58:09 -06:00
malff/marcsql@weblab.(none)
4792ed4220 Bug#28779 (mysql_query() allows execution of statements with unbalanced
comments)

This change set is for 5.1 (manually merged)

Before this fix, the server would accept queries that contained comments,
even when the comments were not properly closed with a '*' '/' marker.

For example,
  select 1 /* + 2 <EOF>
would be accepted as
  select 1 /* + 2 */ <EOF>
and executed as
  select 1

With this fix, the server now rejects queries with unclosed comments
as syntax errors.
Both regular comments ('/' '*') and special comments ('/' '*' '!') must be
closed with '*' '/' to be parsed correctly.
2007-08-30 12:57:05 -06:00
kostja@bodhi.(none)
5b10ba2ce2 Add -Wno-unused to --warning-mode=pedantic, otherwise sql/ compilation
generated so many warnings that the mode was unusable.
2007-08-30 21:19:05 +04:00
malff/marcsql@weblab.(none)
80609d18fc Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge
2007-08-30 10:53:11 -06:00
malff/marcsql@weblab.(none)
f51c6acc37 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-28779-b
2007-08-30 10:38:20 -06:00
anozdrin/alik@ibm.opbmk
f141ba5e26 Cleanup-patch for BUG#25843: changing default database between
PREPARE and EXECUTE of statement breaks binlog.
2007-08-30 20:06:19 +04:00
kaa@polly.(none)
4c2a63ea54 Merge polly.(none):/home/kaa/src/bug30164/my50-bug30164
into  polly.(none):/home/kaa/src/bug30164/my51-bug30164
2007-08-30 17:23:39 +04:00
kaa@polly.(none)
33d10a0667 Use double quotes instead of single ones which make the test fail on Windows. This is for bug #30164. 2007-08-30 17:21:43 +04:00
kaa@polly.(none)
e79902aa5c Merge polly.(none):/home/kaa/src/bug30164/my50-bug30164
into  polly.(none):/home/kaa/src/bug30164/my51-bug30164
2007-08-30 12:55:29 +04:00
kaa@polly.(none)
2bb849644b Bug #30164: Using client side macro inside server side comments generates broken queries
Problem:
  
In cases when a client-side macro appears inside a server-side comment, the add_line() function in mysql.cc discarded all characters until the next delimiter to remove macro arguments from the query string. This resulted in broken queries being sent to the server when the next delimiter character appeared past the comment's boundaries, because the comment closing sequence ('*/') was discarded.
  
Fix:
  
If a client-side macro appears inside a server-side comment, discard all characters in the comment after the macro (that is, until the end of the comment rather than the next delimiter).
This is a minimal fix to allow only simple cases used by the mysqlbinlog utility. Limitations that are worth documenting:
  
- Nested server-side and/or client-side comments are not supported by mysql.cc
- Using client-side macros in multi-line server-side comments is not supported
- All characters after a client-side macro in a server-side comment will be omitted from the query string (and thus, will not be sent to server).
2007-08-30 12:53:24 +04:00
malff/marcsql@weblab.(none)
88091e8250 Bug#30712 (open_performance_schema_table() cause an open table leak on
failures)

Fixed open_performance_schema_table() and close_performance_schema_table()
implementation and callers, to always execute balanced calls to:
  thd->reset_n_backup_open_tables_state(backup);
  thd->restore_backup_open_tables_state(backup);
2007-08-29 18:56:00 -06:00
malff/marcsql@weblab.(none)
496eb569d9 Manual merge 2007-08-29 17:27:38 -06:00
malff/marcsql@weblab.(none)
180ca23820 Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge
2007-08-29 16:51:41 -06:00
davi@moksha.local
a2a5104de7 Post-merge fixes for Bug#30632 2007-08-29 19:00:49 -03:00
brian@piggy.tangent.org
52ae4496c5 Added ORDER BY to udf select so that results are ordered. 2007-08-29 14:36:08 -07:00
davi@moksha.local
68047f7f88 Merge moksha.local:/Users/davi/mysql/push/bugs/old/30632-5.0
into  moksha.local:/Users/davi/mysql/push/bugs/30632-5.1
2007-08-29 18:32:19 -03:00
malff/marcsql@weblab.(none)
6f72d99099 Bug#28779 (mysql_query() allows execution of statements with unbalanced
comments)

Before this fix, the server would accept queries that contained comments,
even when the comments were not properly closed with a '*' '/' marker.

For example,
  select 1 /* + 2 <EOF>
would be accepted as
  select 1 /* + 2 */ <EOF>
and executed as
  select 1

With this fix, the server now rejects queries with unclosed comments
as syntax errors.
Both regular comments ('/' '*') and special comments ('/' '*' '!') must be
closed with '*' '/' to be parsed correctly.
2007-08-29 14:50:32 -06:00
davi@moksha.local
cb7486b4bf Bug#21975 Grant and revoke statements are non-transactional
Bug#21422 GRANT/REVOKE possible inside stored function, probably in a trigger
Bug#17244 GRANT gives strange error message when used in a stored function

GRANT/REVOKE statements are non-transactional (no explicit transaction
boundaries) in nature and hence are forbidden inside stored functions and
triggers, but they weren't being effectively forbidden. Furthermore, the
absence of implict commits makes changes made by GRANT/REVOKE statements to
not be rolled back.

The implemented fix is to issue a implicit commit with every GRANT/REVOKE
statement, effectively prohibiting these statements in stored functions
and triggers. The implicit commit also fixes the replication bug, and looks
like being in concert with the behavior of DDL and administrative statements.

Since this is a incompatible change, the following sentence should be
added to the Manual in the very end of the 3rd paragraph, subclause
13.4.3 "Statements That Cause an Implicit Commit": "Beginning with
MySQL 5.0.??, the GRANT and REVOKE statements cause an implicit commit."

Patch contributed by Vladimir Shebordaev
2007-08-29 16:59:38 -03:00
anozdrin/alik@ibm.
290d724943 Test case for Bug#13675: DATETIME/DATE type in store proc param
seems to be converted as varbinary.

The bug has been already fixed. This CS just adds a test case for it.
2007-08-29 14:57:59 +04:00
malff/marcsql@weblab.(none)
d25340c93d Manual merge 2007-08-28 15:56:12 -06:00
malff/marcsql@weblab.(none)
bdc65c4325 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge
2007-08-28 15:53:43 -06:00
davi@moksha.local
74fcc76028 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  moksha.local:/Users/davi/mysql/push/mysql-5.0-runtime
2007-08-28 18:47:08 -03:00
malff/marcsql@weblab.(none)
eec4d248a2 Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge
2007-08-28 11:46:24 -06:00
malff/marcsql@weblab.(none)
ec9b9a98aa Bug#30625 (Performance, reduce depth for expressions)
This is a performance bug, affecting in particular the bison generated code
for the parser.

Prior to this fix, the grammar used a long chain of reduces to parse an
expression, like:
  bit_expr -> bit_term
  bit_term -> bit_factor
  bit_factor -> value_expr
  value_expr -> term
  term -> factor
etc

This chain of reduces cause the internal state automaton in the generated
parser to execute more state transitions and more reduces, so that the
generated MySQLParse() function would spend a lot of time looping to execute
all the grammar reductions.

With this patch, the grammar has been reorganized so that rules are more
"flat", limiting the depth of reduces needed to parse <expr>.

Tests have been written to enforce that relative priorities and properties
of operators have not changed while changing the grammar.

See the bug report for performance data.
2007-08-28 11:16:03 -06:00
baker@bk-internal.mysql.com
25c467bf6f Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-arch
2007-08-27 20:20:08 +02:00
davi@moksha.local
77d78a883f Bug#30632 HANDLER read failure causes hang
If, after the tables are locked, one of the conditions to read from a
HANDLER table is not met, the handler code wrongly jumps to a error path
that won't unlock the tables.

The user-visible effect is that after a error in a handler read command,
all subsequent handler operations on the same table will hang.

The fix is simply to correct the code to jump to the (same) error path that
unlocks the tables.
2007-08-27 10:37:12 -03:00
davi@moksha.local
048474064a Merge moksha.local:/Users/davi/mysql/push/mysql-5.1-runtime
into  moksha.local:/Users/davi/mysql/push/bugs/29936-5.1
2007-08-27 10:24:20 -03:00
davi@moksha.local
769cd00e13 Merge moksha.local:/Users/davi/mysql/push/bugs/25164-5.0
into  moksha.local:/Users/davi/mysql/push/bugs/25164-5.1
2007-08-27 10:19:58 -03:00
davi@moksha.local
91e1cc2195 Bug#25164 create table a as select * from A hangs
The problem from a user's perspective: user creates table A, and then tries
to CREATE TABLE a SELECT from A - and this causes a deadlock error, a hang,
or fails with a debug assert, but only if the storage engine is InnoDB.

The origin of the problem: InnoDB uses case-insensitive collation
(system_charset_info) when looking up the internal table share, thus returning
the same share for 'a' and 'A'.

Cause of the user-visible behavior: since the same share is returned to SQL
locking subsystem, it assumes that the same table is first locked (within the
same session) for WRITE, and then for READ, and returns a deadlock error.
However, the code is wrong in not properly cleaning up upon an error, leaving
external locks in place, which leads to assertion failures and hangs.

Fix that has been implemented: the SQL layer should properly propagate the
deadlock error, cleaning up and freeing all resources.

Further work towards a more complete solution: InnoDB should not use case
insensitive collation for table share hash if table names on disk honor the case.
2007-08-27 10:13:54 -03:00
df@pippilotta.erinye.com
0c66cf7bbc Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
2007-08-27 11:40:38 +02:00
df@pippilotta.erinye.com
0670af9479 adjust version number 2007-08-27 11:38:32 +02:00
dfischer/mysqldev@mysql.com/production.mysql.com
ba419bdc8c Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/data0/mysqldev/my/build-200708231546-5.0.48/mysql-5.0-release
2007-08-27 11:24:54 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
b82525ecfa Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-marvel
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-08-25 12:33:23 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
b7231ad5d9 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-25 12:08:18 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
516cafdc79 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-marvel
2007-08-25 11:39:56 +03:00
davi@moksha.local
0b8bc8a96b Add test case for bug 29936 Stored Procedure DML ignores low_priority_updates setting.
This test case uses the wait_condition helper (only available in 5.1) in order to wait till the select/update opens and locks the table.
2007-08-24 19:17:29 -03:00