Commit graph

22910 commits

Author SHA1 Message Date
mkindahl@dl145h.mysql.com
6b5cb11dba Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-new-rpl
2007-11-14 11:07:30 +01:00
mats@kindahl-laptop.dnsalias.net
6921dd0156 Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1
into  kindahl-laptop.dnsalias.net:/home/bk/b31611-mysql-5.1-target-5.1.22
2007-11-08 08:54:19 +01:00
mats@kindahl-laptop.dnsalias.net
21f5bd1074 Second attempt at getting rid of warnings in replication tree. 2007-11-07 18:12:21 +01:00
mats@kindahl-laptop.dnsalias.net
191c503a79 Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b28086-mysql-5.1-rpl
2007-11-07 16:11:59 +01:00
mats@kindahl-laptop.dnsalias.net
484de4fc6d Adding return value, which is not used, and wrapped debug function in
DBUG_OFF #ifdefs to eliminate two warnings in replication tree.
2007-11-07 15:23:57 +01:00
mats@kindahl-laptop.dnsalias.net
cf56c586b7 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
2007-11-07 11:38:44 +01:00
aelkin/elkin@koti.dsl.inet.fi
0dc13ecd38 Merge koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27571_asyn_killed_flags
into  koti.dsl.inet.fi:/home/elkin/MySQL/merge-5.1
2007-11-06 20:41:06 +02:00
malff@lambda.hsd1.co.comcast.net.
3434e4ed30 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-runtime
2007-11-06 11:31:00 -07:00
aelkin/elkin@koti.dsl.inet.fi
9c979676cc Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug28597-log_name_upgrade
2007-11-06 17:12:56 +02:00
gkodinov/kgeorge@magare.gmz
948701b40a Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  magare.gmz:/home/kgeorge/mysql/autopush/B31974-5.1-runtime
2007-11-06 15:41:12 +02:00
aelkin/elkin@koti.dsl.inet.fi
355c6a2deb Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27571_asyn_killed_flags
2007-11-06 13:27:48 +02:00
malff@lambda.hsd1.co.comcast.net.
36e0b66638 fixed coding style 2007-11-05 16:52:04 -07:00
malff@lambda.hsd1.co.comcast.net.
f0f63f8ff9 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-05 10:20:20 -07:00
aelkin/elkin@koti.dsl.inet.fi
27636d5601 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug28597-log_name_upgrade
2007-11-05 18:13:31 +02:00
aelkin/elkin@koti.dsl.inet.fi
571f8be430 Bug #28597 Replication doesn't start after upgrading to 5.1.18
Since bug@20166, which replaced the binlog file name generating to base
on pidfile_name instead of the previous glob_hostname, the binlog file
name suddenly started to be stored solely in the absolute path format,
including a case when --log-bin option meant a relative path.
What's more serious, the path for binlog file can lead unrequestedly 
to pid-file directory so that after any proper fix for this bug
there might be similar to the bug report consequences for one who
upgrades from post-fix-bug@20166-pre-fix-bug@28597 to post-fix-bug@28597.

Fixed with preserving`pidfile_name' (intr.by bug@20166) but stripping
off its directory part. This restores the original logics of storing
the names in compatible with --log-bin option format and with the
requirement for --log-bin ralative path to corresond to the data directory.
Side effects for this fix:

effective fixing bug@27070, refining its test;
ensuring no overrun for buff can happen anymore (Bug#31836 
insufficient space reserved for the suffix of relay log file name);
bug#31837  --remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql missed
in rpl_temporary.test;
fixes Bug@28603  Invalid log-bin default location;
2007-11-05 17:20:10 +02:00
mats@kindahl-laptop.dnsalias.net
31787d3d56 BUG#31611 (Security risk with BINLOG statement):
Incremental patch to remove redundant, but benign, my_error() call.
2007-11-05 14:24:20 +01:00
mats@kindahl-laptop.dnsalias.net
ce78ae901c Merge mysqldev@production:/data0/mysqldev/my/mysql-5.1-release
into  kindahl-laptop.dnsalias.net:/home/bk/b31611-mysql-5.1-target-5.1.22
2007-11-05 13:46:46 +01:00
gkodinov/kgeorge@magare.gmz
8f6a0a4c3c Bug #31974: Wrong EXPLAIN output
The fix for bug 31148 is not correct. It does not
have a relation to the problem described in this bug.
And removing the fix will not make the bug to re-appear.
Fixed the bug #31974 by removing the fix for bug 31148
and adding a test case.
2007-11-05 13:19:56 +02:00
mats@kindahl-laptop.dnsalias.net
c0138b94f0 BUG#31611 (Security risk with BINLOG statement):
Adding check that the user executing a BINLOG statement has SUPER
privileges and aborting execution of the statement with an error
otherwise.
2007-11-03 01:33:48 +01:00
kostja@bodhi.(none)
a0f55d11f6 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc-2
2007-11-02 02:40:23 +03:00
kostja@bodhi.(none)
2ce9194411 A fix for Bug#32030 "DELETE does not return an error and deletes rows if
error evaluating WHERE"

DELETE with a subquery in WHERE clause would sometimes ignore subquery
evaluation error and proceed with deletion.

The fix is to check for an error after evaluation of the WHERE clause
in DELETE.

Addressed review comments.
2007-11-02 02:36:12 +03:00
davi@endora.local
a9da8219f0 Merge endora.local:/Users/davi/mysql/bugs/30882-5.1
into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
2007-11-01 20:48:14 -02:00
davi@endora.local
333b91f8e6 Merge endora.local:/Users/davi/mysql/bugs/31850-5.1
into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
2007-11-01 20:44:09 -02:00
davi@endora.local
cc007acb78 Bug#30882 Dropping a temporary table inside a stored function may cause a server crash
If a stored function that contains a drop temporary table statement
is invoked by a create temporary table of the same name may cause
a server crash. The problem is that when dropping a table no check
is done to ensure that table is not being used by some outer query
(or outer statement), potentially leaving the outer query with a
reference to a stale (freed) table.

The solution is when dropping a temporary table, always check if
the table is being used by some outer statement as a temporary
table can be dropped inside stored procedures.

The check is performed by looking at the TABLE::query_id value for
temporary tables. To simplify this check and to solve a bug related
to handling of temporary tables in prelocked mode, this patch changes
the way in which this member is used to track the fact that table is
used/unused. Now we ensure that TABLE::query_id is zero for unused
temporary tables (which means that all temporary tables which were
used by a statement should be marked as free for reuse after it's
execution has been completed).
2007-11-01 18:52:56 -02:00
davi@endora.local
968af72150 Bug#31850 Test crashes in "embedded" server
The mysql_change_user command fails to properly update the database pointer
when no database is selected, leading to "use after free" errors. The same
happens on the user privilege pointer in the thread security context.

The solution is to properly reset and update the database name. Also update
the user_priv pointer so that it doesn't point to freed memory.
2007-11-01 17:29:20 -02:00
kostja@bodhi.(none)
8f90f66d43 Cleanup execute_ddl_log_recovery() to not generate an error if
there is nothing to recover.

Discovered while working on Bug#12713
2007-11-01 18:33:51 +03:00
kostja@bodhi.(none)
7e119ec0d1 Use Internal_error_handler mechanism to silence ER_TOO_MANY_FIELDS
error in mysql_create_frm instead of
direct access to my_error() members.

This is a pre-requisite for the patch for Bug#12713.
2007-11-01 18:06:46 +03:00
kostja@bodhi.(none)
6bd9f5c1cb Use thd->is_error() instead of direct access to thd->net.report_error
in evaluate_join_record().

A minor cleanup required for the fix for Bug#12713.
2007-11-01 17:08:02 +03:00
kostja@bodhi.(none)
f60b890967 Fix a compilation warning. 2007-11-01 17:00:24 +03:00
kostja@bodhi.(none)
5fa9440ade Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc-2
2007-11-01 14:24:32 +03:00
kostja@bodhi.(none)
26326ed0b7 A fix for Bug#32007 select udf_function() doesn't return an error if error
during udf initialization. The bug is spotted while working on Bug 12713.

If a user-defined function was used in a SELECT statement, and an
error would occur during UDF initialization, this error would not terminate
execution of the SELECT, but rather would be converted to a warning.

The fix is to use a stack buffer to store the message from udf_init instead
of private my_error() buffer.
2007-11-01 00:31:57 +03:00
kostja@bodhi.(none)
c0bb7f8682 Remove net_printf_error(). Do not talk to network directly in
check_user()/check_connection()/check_for_max_user_connections().

This is a pre-requisite patch for the fix for Bug#12713 "Error in a stored 
function called from a SELECT doesn't cause ROLLBACK of statem"

Implement review comments.
2007-11-01 00:10:58 +03:00
mats@kindahl-laptop.dnsalias.net
16c1655471 BUG#28086 (SBR of USER() becomes corrupted on slave):
Marking statements containing USER() or CURRENT_USER() as unsafe, causing
them to switch to using row-based logging in MIXED mode and generate a
warning in STATEMENT mode.
2007-10-31 21:09:52 +01:00
kostja@bodhi.(none)
3154b2bee4 Cleanup: rename select_send::status to select_send::is_result_set_started.
Add select_send::cleanup.
Fix a compilation warning.
Issues spotted while working on the fix for Bug#12713.
2007-10-31 18:33:13 +03:00
thek@adventure.(none)
19f1330e69 Merge adventure.(none):/home/thek/Development/cpp/bug31347/my51-bug31347
into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
2007-10-31 13:22:19 +01:00
thek@adventure.(none)
5b603aa47a Merge adventure.(none):/home/thek/Development/cpp/bug31347/my50-bug31347
into  adventure.(none):/home/thek/Development/cpp/bug31347/my51-bug31347
2007-10-31 13:12:45 +01:00
thek@adventure.(none)
8549a8ea8f Bug#31347 Increase in memory usage after many DROP USER statements
Dropping users causes huge increase in memory usage because field values were
allocated on the server memory root for temporary usage but never deallocated.

This patch changes the target memory root to be that of the thread handler
instead since this root is cleared between each statement.
2007-10-31 12:25:18 +01:00
davi@endora.local
f3e0d95f45 Merge endora.local:/Users/davi/mysql/bugs/30904-5.1
into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
2007-10-30 20:52:21 -02:00
davi@endora.local
756a86f06d Bug#30904 SET PASSWORD statement is non-transactional
The SET PASSWORD statement is non-transactional (no explicit transaction
boundaries) in nature and hence is forbidden inside stored functions and
triggers, but it weren't being effectively forbidden.

The implemented fix is to issue a implicit commit with every SET PASSWORD
statement, effectively prohibiting these statements in stored functions
and triggers.
2007-10-30 20:51:04 -02:00
mats@kindahl-laptop.dnsalias.net
7a1c7ab9a2 Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b19958-mysql-5.1-rpl
2007-10-30 21:23:53 +01:00
mats@kindahl-laptop.dnsalias.net
9cc4b8dd80 BUG#19958 (RBR idempotency issue for UPDATE and DELETE):
The rpl_trigger test case indicated a problem with idempotency support when run
under row-based replication, which this patch fixes.

However, despite this, the test is not designed for execution under row-based
replication and hence rpl_trigger.test is not executed under row-based
replication.

The problem is that the test expects triggers to be executed when the slave
updates rows on the slave, and this is (deliberately) not done with row-based
replication.
2007-10-30 21:17:19 +01:00
kostja@bodhi.(none)
230604f33c In ha_delete_table, use a standard mechanism to intercept the error message
and convert it to a warning instead of direct manipulation with the
thread error stack.
Fix a bug in handler::print_erorr when a garbled message was
printed for HA_ERR_NO_SUCH_TABLE.
This is a pre-requisite patch for the fix for Bug#12713 Error in a stored
function called from a SELECT doesn't cause ROLLBACK of statem
2007-10-30 22:35:14 +03:00
kostja@bodhi.(none)
cd72fffa5f Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc-2
2007-10-30 20:10:11 +03:00
kostja@bodhi.(none)
e4b353c40c Use an inline getter method (thd->is_error()) to query if there is an error
in THD.
In future the error may be stored elsewhere (not in net.report_error) and 
it's important to start using an opaque getter to simplify merges.
2007-10-30 20:08:16 +03:00
aelkin@dl145j.mysql.com
c2b0410ca1 manual merge 2007-10-30 14:08:37 +01:00
kostja@bodhi.(none)
5a09edd203 Fix failing init_connect.test (5.1-runtime). 2007-10-30 15:39:50 +03:00
aelkin/elkin@koti.dsl.inet.fi
01f86563cb Manual merge 5.0-rpl -> 5.1-rpl.
involved bug#12691, bug#27571
2007-10-30 13:49:42 +02:00
tomas@whalegate.ndb.mysql.com
a214b1b9ba Merge whalegate.ndb.mysql.com:/home/tomas/cge-5.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge
2007-10-30 11:28:19 +01:00
aelkin/elkin@koti.dsl.inet.fi
e65d20b5f4 Merge koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27571_asyn_killed_flags
into  koti.dsl.inet.fi:/home/elkin/MySQL/5.1-merge-bug27571
2007-10-30 11:31:03 +02:00
aelkin/elkin@koti.dsl.inet.fi
f974872f5c Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27571_asyn_killed_flags
2007-10-30 10:32:20 +02:00