Commit graph

50027 commits

Author SHA1 Message Date
davi@moksha.com.br
2adf38c12e Bug#29223 declare cursor c for SHOW .....
"DECLARE CURSOR FOR SHOW ..." is a syntax that currently appears to work,
but is untested for some SHOW commands and does not work for other SHOW
commands.

Since this is an un-intended feature that leaked as a result of a coding bug
(in the parser grammar), the correct fix is to fix the grammar to not accept
this construct.

In other words, "DECLARE CURSOR FOR SHOW <other commands that don't work>"
is not considered a bug, and we will not implement other features to make all
the SHOW commands usable inside a cursor just because someone exploited a bug.
2007-10-11 17:38:40 -03:00
anozdrin/alik@station.
7237c31698 A patch for BUG#31418: User locks misfunctioning after
mysql_change_user().

The problem was that THD::ull was not reset in THD::cleanup().

The fix is to reset it.
2007-10-11 17:11:12 +04:00
davi@moksha.com.br
4515ccf7c0 Post-merge test case for Bug 31409 2007-10-10 21:39:22 -03:00
davi@moksha.com.br
9f088628eb Merge moksha.com.br:/Users/davi/mysql/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/bugs/31409-5.1
2007-10-10 21:16:53 -03:00
davi@moksha.com.br
2f946efda7 Mismerge broken 5.1-runtime compilation because do_command was defined
static but it's still used by another compilation unit.

Remove static qualifier from do_command definition.
2007-10-10 21:07:23 -03:00
davi@moksha.com.br
842a11ac9e Merge moksha.com.br:/Users/davi/mysql/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/mysql-5.1-runtime
2007-10-10 19:55:23 -03:00
davi@moksha.com.br
ed55fe3d96 Merge moksha.com.br:/Users/davi/mysql/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/mysql-5.1-runtime
2007-10-10 19:44:12 -03:00
davi@moksha.com.br
cbbf8fc9b9 Merge moksha.com.br:/Users/davi/mysql/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/mysql-5.1-runtime
2007-10-10 19:43:29 -03:00
davi@moksha.com.br
0df3c69597 Merge moksha.com.br:/Users/davi/mysql/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/mysql-5.1-runtime
2007-10-10 19:42:35 -03:00
davi@moksha.com.br
0b2bda4c2a Merge moksha.com.br:/Users/davi/mysql/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/mysql-5.1-runtime
2007-10-10 19:41:58 -03:00
davi@moksha.com.br
ae462f3e77 Post-merge test case for Bug 21587 2007-10-10 19:06:53 -03:00
davi@moksha.com.br
f74f363aac Merge moksha.com.br:/Users/davi/mysql/bugs/21587-5.0
into  moksha.com.br:/Users/davi/mysql/bugs/21587-5.1
2007-10-10 18:17:11 -03:00
anozdrin/alik@station.
ac83b3122c Fix for BUG#20023: mysql_change_user() resets the value
of SQL_BIG_SELECTS.

The bug was that SQL_BIG_SELECTS was not properly set
in COM_CHANGE_USER.

The fix is to update SQL_BIG_SELECTS properly.
2007-10-10 17:57:01 +04:00
anozdrin/alik@station.
c6c419f919 Fix automerge. 2007-10-10 13:53:24 +04:00
anozdrin/alik@station.
50c8101ad8 Merge station.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
2007-10-10 13:35:40 +04:00
malff@lambda.hsd1.co.comcast.net.
190bb6bf4c Fixed packet length for embedded tests 2007-10-09 18:12:13 -06:00
davi@moksha.com.br
c3d06676f8 Merge moksha.com.br:/Users/davi/mysql/push/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/push/bugs/31409-5.0
2007-10-09 16:27:54 -03:00
davi@moksha.local
7252cbe1e0 Bug#31409 RENAME TABLE causes server crash or deadlock when used with HANDLER statements
This deadlock occurs when a client issues a HANDLER ... OPEN statement
that tries to open a table that has a pending name-lock on it by another
client that also needs a name-lock on some other table which is already
open and associated to a HANDLER instance owned by the first client.
The deadlock happens because the open_table() function will back-off
and wait until the name-lock goes away, causing a circular wait if some
other name-lock is also pending for one of the open HANDLER tables.

Such situation, for example, can be easily repeated by issuing a RENAME
TABLE command in such a way that the existing table is already open
as a HANDLER table by another client and this client tries to open
a HANDLER to the new table name.

The solution is to allow handler tables with older versions (marked for
flush) to be closed before waiting for the name-lock completion. This is
safe because no other name-lock can be issued between the flush and the
check for pending name-locks.

The test case for this bug is going to be committed into 5.1 because it
requires a test feature only avaiable in 5.1 (wait_condition).
2007-10-09 12:02:59 -03:00
davi@moksha.local
efdd32ced3 Merge moksha.local:/Users/davi/mysql/push/mysql-5.0-runtime
into  moksha.local:/Users/davi/mysql/push/mysql-5.1-runtime
2007-10-09 09:48:49 -03:00
anozdrin/alik@station.
27ee6db9db Fix merge. 2007-10-09 14:53:15 +04:00
anozdrin/alik@station.
1d63cac004 Merge station.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
2007-10-09 14:32:43 +04:00
malff@lambda.hsd1.co.comcast.net.
437fdeaa16 Test cleanup, the upgrade test script assumes a unix like environment 2007-10-08 12:37:57 -06:00
anozdrin/alik@station.
2885d0df15 Get rid of compilation warning. 2007-10-08 17:59:23 +04:00
anozdrin/alik@station.
128772ba1f Fix compilation warning. 2007-10-08 17:09:28 +04:00
kostja@bodhi.(none)
7ec30183bb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime
2007-10-08 02:05:55 +04:00
kostja@bodhi.(none)
53b0324824 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime
2007-10-08 02:05:10 +04:00
msvensson@pilot.mysql.com
ffd9c2bb76 Merge bk-internal:/home/bk/mysql-5.0-runtime
into  pilot.mysql.com:/data/msvensson/mysql/my50-r-bug30992
2007-10-05 14:47:43 +02:00
anozdrin/alik@station.
ac875690f7 Fix for BUG#20550: Stored function: wrong RETURN type metadata
when used in a VIEW.

The problem was that wrong function (create_tmp_from_item())
was used to create a temporary field for Item_func_sp.

The fix is to use create_tmp_from_field().
2007-10-05 16:35:01 +04:00
davi@moksha.local
a8f2ba0f80 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  moksha.local:/Users/davi/mysql/push/mysql-5.0-runtime
2007-10-04 19:56:27 -03:00
davi@moksha.local
305ebc1e21 Bug#21587 FLUSH TABLES causes server crash when used with HANDLER statements
This bug is a symptom of the way handler's tables are managed. The
most different aspect, compared to the conventional behavior, is that
the handler's tables are long lived, meaning that their lifetimes are
not bounded by the duration of the command that opened them. For this
effect the handler code uses its own list (handler_tables instead of
open_tables) to hold open handler tables so that the tables won't be
closed at the end of the command/statement. Besides the handler_tables
list, there is a hash (handler_tables_hash) which is used to associate
handler aliases to tables and to refresh the tables upon demand (flush
tables).

The current implementation doesn't work properly with refreshed tables
-- more precisely when flush commands are issued by other initiators.
This happens because when a handler open or read statement is being
processed, the associated table has to be opened or locked and, for this
matter, the open_tables and handler_tables lists are swapped so that the
new table being opened is inserted into the handler_tables list. But when
opening or locking the table, if the refresh version is different from the
thread refresh version then all used tables in the open_tables list (now
handler_tables) are refreshed. In the "refreshing" process the handler
tables are flushed (closed) without being properly unlinked from the
handler hash.

The current implementation also fails to properly discard handlers of
dropped tables, but this and other problems are going to be addressed
in the fixes for bugs 31397 and 31409.

The chosen approach tries to properly save and restore the table state
so that no table is flushed during the table open and lock operations.
The logic is almost the same as before with the list swapping, but with
a working glue code.

The test case for this bug is going to be committed into 5.1 because it
requires a test feature only avaiable in 5.1 (wait_condition).
2007-10-04 17:34:41 -03:00
joerg@trift2.
571200d487 Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1
2007-10-04 19:31:32 +02:00
joerg@trift2.
82767a0a45 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-10-04 19:24:32 +02:00
anozdrin/alik@station.
707f067446 Fix for BUG#31035: select from function, group by result crasher.
This actually, fix for the patch for bug-27354. The problem with
the patch was that Item_func_sp::used_tables() was updated, but
Item_func_sp::const_item() was not. So, for Item_func_sp, we had
the following inconsistency:
  - used_tables() returned RAND_TABLE, which means that the item
    can produce "random" results;
  - but const_item() returned TRUE, which means that the item is
    a constant one.

The fix is to change Item_func_sp::const_item() behaviour: it must
return TRUE (an item is a constant one) only if a stored function
is deterministic and each of its arguments (if any) is a constant
item.
2007-10-04 17:19:14 +04:00
jperkin@production.mysql.com
09560c6539 Merge production.mysql.com:/usersnfs/jperkin/bk/build/5.0
into  production.mysql.com:/usersnfs/jperkin/bk/build/5.1
2007-10-04 12:21:51 +02:00
jperkin@production.mysql.com
583a3ef31d Merge production.mysql.com:/usersnfs/jperkin/bk/build/5.0
into  production.mysql.com:/usersnfs/jperkin/bk/bug-27692/5.0
2007-10-04 12:06:13 +02:00
jperkin@production.mysql.com
5c0c592145 Restore creation of test databases and the anonymous user which
were accidentally removed during a previous rototill of this
code.  Fixes bug#27692.
  
While it can be argued we should strive to provide a 'secure by
default' installation, this happens to be the setup currently
documented in the manual as the default, so defer changes that
improve security out of the box to a co-ordinated effort later
on.
  
For now, make a note about the test databases and anonymous user
in mysql_install_db and recommend that mysql_secure_installation
be ran for users wishing to remove these defaults.

[..re-commit of previously lost change..]
2007-10-04 11:30:30 +02:00
msvensson@pilot.mysql.com
18c6118911 Bug#30992 Wrong implementation of pthread_mutex_trylock()
It's not possible to use WaitForSingleObject to wait
on a CRITICAL_SECTION, instead use the TryEnterCriticalSection function.
 - if "mutex" was already taken => return EBUSY
 - if "mutex" was aquired => return 0
2007-10-03 21:38:32 +02:00
jmiller/ndbdev@mysql.com/ndb15.mysql.com
6515a7f4c3 testScanFilter.cpp:
Updated variable size arrays to use vector like Jonas did for 5.1 so that my build would not break
2007-10-02 21:21:45 +02:00
kent@kent-amd64.(none)
6598c8dc2d Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  mysql.com:/home/kent/bk/make-install/mysql-5.1-build
2007-10-01 18:52:25 +02:00
kent@mysql.com/kent-amd64.(none)
4d2c8e2445 make_binary_distribution.sh:
Added special handling of "mysql_install_db" and "mysql.server" scripts,
  find executables relative to the current directory.
2007-10-01 18:41:38 +02:00
mats@kindahl-laptop.dnsalias.net
23622616ab Merge kindahl-laptop.dnsalias.net:/home/bk/b30992-mysql-5.0-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b30992-mysql-5.0-runtime
2007-10-01 15:14:58 +02:00
mats@kindahl-laptop.dnsalias.net
5dad55cd24 BUG#30992 (Wrong implementation of pthread_mutex_trylock()):
Adding support for correct handling of pthread_mutex_trylock() on Win32
systems as well as when using the safe mutexes.
2007-10-01 15:11:15 +02:00
anozdrin/alik@station.
7f554deb95 BUG#30472: libmysql doesn't reset charset, insert_id after
succ. mysql_change_user() call.

Use 2 bytes for character set number.
2007-10-01 15:41:18 +04:00
joerg@trift2.
3114699f56 Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1
2007-10-01 12:31:24 +02:00
joerg@trift2.
a4450a710c Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-10-01 12:19:06 +02:00
joerg@trift2.
7c0f4a7a2e Fix bug#31150 "Test case does not cleanup":
Add the cleanup by dropping the database 'track' in test "rpl_bug31076".
2007-10-01 12:10:46 +02:00
anozdrin/alik@station.
0635a75f4a Fix compilation warnings. 2007-10-01 00:16:50 +04:00
joerg@trift2.
290aaf7c4e Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  trift2.:/MySQL/M51/push-5.1
2007-09-29 22:04:44 +02:00
anozdrin/alik@station.
95e01d4453 Fix compile warnings. 2007-09-29 23:31:08 +04:00
davi@moksha.local
80618e723e Merge moksha.local:/Users/davi/mysql/push/mysql-5.1-runtime
into  moksha.local:/Users/davi/mysql/push/bugs/21136-regression
2007-09-29 16:06:46 -03:00