konstantin@mysql.com
38486e83c1
Implement WL#2661 "Prepared Statements: Dynamic SQL in Stored Procedures".
...
The idea of the patch is to separate statement processing logic,
such as parsing, validation of the parsed tree, execution and cleanup,
from global query processing logic, such as logging, resetting
priorities of a thread, resetting stored procedure cache, resetting
thread count of errors and warnings.
This makes PREPARE and EXECUTE behave similarly to the rest of SQL
statements and allows their use in stored procedures.
This patch contains a change in behaviour:
until recently for each SQL prepared statement command, 2 queries
were written to the general log, e.g.
[Query] prepare stmt from @stmt_text;
[Prepare] select * from t1 <-- contents of @stmt_text
The chagne was necessary to prevent [Prepare] commands from being written
to the general log when executing a stored procedure with Dynamic SQL.
We should consider whether the old behavior is preferrable and probably
restore it.
This patch refixes Bug#7115, Bug#10975 (partially), Bug#10605 (various bugs
in Dynamic SQL reported before it was disabled).
2005-09-03 03:13:18 +04:00
konstantin@mysql.com
a3ddcdf8fb
Rename:
...
- current_arena to stmt_arena: the thread may have more than one
'current' arenas: one for runtime data, and one for the parsed
tree of a statement. Only one of them is active at any moment.
- set_item_arena -> set_query_arena, because Item_arena was renamed to
Query_arena a while ago
- set_n_backup_item_arena -> set_n_backup_active_arena;
the active arena is the arena thd->mem_root and thd->free_list
are currently pointing at.
- restore_backup_item_arena -> restore_active_arena (with the same
rationale)
- change_arena_if_needed -> activate_stmt_arena_if_needed; this
method sets thd->stmt_arena active if it's not done yet.
2005-09-02 17:21:19 +04:00
jonas@eel.(none)
b44b36bd1f
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
...
into eel.(none):/home/jonas/src/mysql-5.0-push
2005-09-02 14:17:56 +02:00
jonas@eel.(none)
fda35a632c
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
...
into eel.(none):/home/jonas/src/mysql-5.0-push
2005-09-02 13:21:29 +02:00
lars@mysql.com
5fe6cbf771
Removed redundant case in Makefile.am
2005-09-02 12:20:18 +02:00
jonas@eel.(none)
7eed7760c7
Merge eel.(none):/home/jonas/src/mysql-5.0
...
into eel.(none):/home/jonas/src/mysql-5.0-push
2005-09-02 12:09:54 +02:00
jonas@eel.(none)
892f0964a8
Merge eel.(none):/home/jonas/src/mysql-4.1
...
into eel.(none):/home/jonas/src/mysql-5.0
2005-09-02 12:03:58 +02:00
lars@mysql.com
4a2d37926c
Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0
...
into mysql.com:/users/lthalmann/bk/mysql-5.0
2005-09-02 11:56:53 +02:00
jonas@eel.(none)
4b80ed1bde
ndb - fix printout related to bug#10987
2005-09-02 11:55:41 +02:00
jonas@eel.(none)
b267176708
ndb - bug#12608
...
Always abort if node failure occured between startTransaction and commit
(can later be improved by wl#2610)
2005-09-02 11:50:50 +02:00
jonas@eel.(none)
3a555b999c
ndb - bug #10987
...
make sure not to cut log to early
(specificly not use LCP with maxGciStarted that has not yet completed)
2005-09-02 11:47:24 +02:00
msvensson@neptunus.(none)
d2d1d01f76
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
...
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-09-02 11:19:46 +02:00
msvensson@neptunus.(none)
78f32604ac
mysqltest.test: Remove output from shells in result file
2005-09-02 11:14:47 +02:00
lars@mysql.com
198350d630
Merge mysql.com:/users/lthalmann/bk/mysql-4.1
...
into mysql.com:/users/lthalmann/bk/mysql-5.0
2005-09-02 11:01:00 +02:00
msvensson@neptunus.(none)
d0a78f4dcc
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
...
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-09-02 08:38:48 +02:00
bar@mysql.com
50f622ab04
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0
...
into mysql.com:/usr/home/bar/mysql-5.0
2005-09-02 10:40:06 +05:00
bar@mysql.com
252ed3a24c
sp_head.cc:
...
Fix crash reported in bug 12849.
It doesn't fix the whole problem though.
Let Pem fix it later.
2005-09-02 10:35:51 +05:00
lars@mysql.com
9d8f51fe3a
Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1
...
into mysql.com:/users/lthalmann/bk/mysql-4.1-bug12542
2005-09-02 01:37:16 +02:00
dlenev@mysql.com
c30c632117
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
...
into mysql.com:/home/dlenev/src/mysql-5.0-merges
2005-09-02 01:23:31 +04:00
dlenev@mysql.com
9dcae4c09b
Fixes after merging fix for bug #12423 "Deadlock when doing FLUSH PRIVILEGES
...
and GRANT in multi-threaded environment" into 5.0 tree.
2005-09-02 01:01:33 +04:00
joerg@mysql.com
4b677dfa59
Merge mysql.com:/M40/raymond-4.0 into mysql.com:/M50/merge-5.0
2005-09-01 21:54:18 +02:00
joerg@mysql.com
1c07995d8a
Merge mysql.com:/M50/mysql-5.0 into mysql.com:/M50/merge-5.0
2005-09-01 21:48:10 +02:00
joerg@mysql.com
163ead846e
Merge mysql.com:/M40/raymond-4.0 into mysql.com:/M41/merge-4.1
2005-09-01 21:36:16 +02:00
dlenev@mysql.com
d23732962f
Merge mysql.com:/home/dlenev/src/mysql-4.1-bg12423
...
into mysql.com:/home/dlenev/src/mysql-5.0-merges
2005-09-01 23:25:29 +04:00
joerg@mysql.com
54e797a27d
Manual merge.
2005-09-01 21:06:37 +02:00
msvensson@neptunus.(none)
f1f45919c9
Fix missing command terminator
2005-09-01 20:49:06 +02:00
msvensson@neptunus.(none)
d6b705dd8e
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
...
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-09-01 20:13:42 +02:00
msvensson@neptunus.(none)
1026fa2fe3
Fix for spelling miss and eol junk
2005-09-01 20:02:08 +02:00
joerg@mysql.com
0a2e013c9d
Add "MYSQL_BASE_VERSION" to the list of substituted variables in the "scripts" subdirectory.
2005-09-01 20:01:21 +02:00
lars@mysql.com
6a91b15b8e
Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1
...
into mysql.com:/users/lthalmann/bk/mysql-4.1-bug12542
2005-09-01 19:03:09 +02:00
lars@mysql.com
9dd14fc381
BUG#12542: Added comments
2005-09-01 17:58:00 +02:00
msvensson@neptunus.(none)
544273f9e8
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
...
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-09-01 17:29:49 +02:00
msvensson@neptunus.(none)
28f529d91f
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
...
into neptunus.(none):/home/msvensson/mysql/bug11316/my41-bug11316
2005-09-01 17:21:03 +02:00
msvensson@neptunus.(none)
305dc01078
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
...
into neptunus.(none):/home/msvensson/mysql/bug11316/my50-bug11316
2005-09-01 17:15:37 +02:00
msvensson@neptunus.(none)
4b47ebcfc9
mysqltest improvements, updates after merge + test for 5.0
2005-09-01 17:01:23 +02:00
dlenev@mysql.com
0683c122b6
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
...
into mysql.com:/home/dlenev/src/mysql-4.1-bg12423
2005-09-01 17:01:25 +04:00
dlenev@mysql.com
da2af0bb6d
Fix for bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in
...
multi-threaded environment".
To avoid deadlocks between several simultaneously run account management
commands (particularly between FLUSH PRIVILEGES/SET PASSWORD and GRANT
commands) we should always take table and internal locks during their
execution in the same order. In other words we should first open and lock
privilege tables and only then obtain acl_cache::lock/LOCK_grant locks.
2005-09-01 16:52:59 +04:00
msvensson@neptunus.(none)
9782004002
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
...
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-09-01 14:49:11 +02:00
msvensson@neptunus.(none)
68778715ae
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
...
into neptunus.(none):/home/msvensson/mysql/bug11286/my50-bug11286
2005-09-01 14:47:06 +02:00
kent@mysql.com
b6889a4e72
Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1
...
into mysql.com:/Users/kent/mysql/bk/mysql-4.1
2005-09-01 14:45:39 +02:00
kent@mysql.com
1a5f346bf9
mtr_process.pl:
...
Make sure mtr_kill_processes() is called with an array ref
Corrected error string for STDERR redirect
2005-09-01 14:32:42 +02:00
pekka@mysql.com
d78eee0376
Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-5.0
...
into mysql.com:/export/space/pekka/ndb/version/my50
2005-09-01 14:23:46 +02:00
pekka@mysql.com
cf626c2000
ndb - fix ha_ndb crash on ordered index on nullable varchar
2005-09-01 14:12:48 +02:00
msvensson@neptunus.(none)
e6b282d9f8
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
...
into neptunus.(none):/home/msvensson/mysql/bug12526/my50-bug12526
2005-09-01 14:09:23 +02:00
msvensson@neptunus.(none)
6fb7881f06
Bug #12717 yassl: Crashes in "integer.cpp" when compiled with icc
...
- Temporary fix, disable x86 assembler.
2005-09-01 14:07:45 +02:00
msvensson@neptunus.(none)
61be2a143d
Merge neptunus.(none):/home/msvensson/mysql/bug11316/my41-bug11316
...
into neptunus.(none):/home/msvensson/mysql/bug11316/my50-bug11316
2005-09-01 12:53:23 +02:00
msvensson@neptunus.(none)
8c0f7f82d9
Bug #11286 yassl incompatible with "load data infile"
...
- Make sure that mysqltest always uses ssl when connecting to the server.
- Pass a i32-bit int variable as argument to FIONREAD ioctl.
2005-09-01 11:46:43 +02:00
msvensson@neptunus.(none)
72b08b7e57
Fix compiler warnings for mysqltest.c
2005-09-01 11:11:10 +02:00
msvensson@neptunus.(none)
ced32517c7
Bug #3131 mysqltest fails on $2=$1 assignment in test
2005-09-01 10:53:33 +02:00
msvensson@neptunus.(none)
906f7c4481
Bug #12471 mysqltest, --error within loop affects wrong statement
...
- Move clearing of expected errors
2005-09-01 09:34:40 +02:00