Commit graph

54412 commits

Author SHA1 Message Date
Mats Kindahl
6461089817 Bug #38773: DROP DATABASE cause switch to stmt-mode when there are temporary
tables open

When executing a DROP DATABASE statement in ROW mode and having temporary
tables open at the same time, the existance of temporary tables prevent
the server from switching back to row mode after temporarily switching to
statement mode to handle the logging of the statement.

Fixed the problem by removing the code to switch to statement mode and added
code to temporarily disable the binary log while dropping the objects in the
database.
2008-08-27 10:40:11 +02:00
Andrei Elkin
209e3395d2 merge 2008-07-18 17:02:42 +03:00
Georgi Kodinov
38dcc057c2 merge of 38158 to 5.1-bugteam 2008-07-18 15:00:45 +03:00
Andrei Elkin
a5d1e6101e Bug #36818 rpl_server_id1 fails expecting slave has stopped
the reason for the failure is that io thread passes through a sequence of state
changes before it eventually got stuck at the expect running state as NO.
It's unreasonble to wait for the running status while the whole idea of the test is
to get to the IO thread error.

Fixed with changing the waiting condition.
2008-07-18 14:53:16 +03:00
Georgi Kodinov
5c256ec67a Bug 38158: mysql client regression, can't read dump files
- Revert the fix for bug 33812
- fixed a win32 warning
2008-07-18 13:24:59 +03:00
Alexander Barkov
e390f843d5 Bug#27934 test client_xml misssing initialization
Problem: missing initialization, if the previous test
fails leaving table t1, client_xml fails as well.
Fix: adding initialization.
2008-07-18 14:07:16 +05:00
Andrei Elkin
58cb8cbeb4 Bug #34647 rpl_temporary discovers more than one dump thread and fails to select
Many dump threads can exist due to a way the new version of mtr governs suites.

For this immediate problem the test is refined not to use I_S but rather to reconnect
explicitly with preserving logics of a an old target bug fixes verification.
2008-07-18 11:20:55 +03:00
Sergey Petrunia
19e2ed7642 Automerge 2008-07-17 22:28:42 +04:00
Sergey Petrunia
6cac08bcfb Merge BUG#35478 into mysql-5.1-bugteam 2008-07-17 22:26:55 +04:00
Kristofer Pettersson
e443cafb09 Null merge 2008-07-24 15:41:55 +02:00
Sergey Petrunia
e8a5662ea9 Automerged 2008-07-17 20:22:39 +04:00
Georgi Kodinov
7f16afccfb merge of bug #37830 to 5.1 2008-07-17 18:51:24 +03:00
Georgi Kodinov
5dfdccab24 Folow-up on Bug#37069: fix a valgrind warning
Don't initalize federated if it's disabled by a command line option.
2008-07-17 17:33:41 +03:00
Georgi Kodinov
66d12592cb auto merged 5.0-bugteam to /Users/kgeorge/B37830-5.0-bugteam 2008-07-17 15:14:35 +03:00
Kristofer Pettersson
e84b915985 Automerge 2008-07-17 12:16:53 +02:00
Kristofer Pettersson
e84c8815fa Reverting patch for bug30087 2008-07-17 11:31:22 +02:00
Horst Hunger
c3c4c6b54c Fix for bug#38164. Removed test of values larger than max int for 32 bits. 2008-07-17 11:03:17 +02:00
Kristofer Pettersson
f4c138cc5e Null merge. 2008-07-17 10:43:02 +02:00
Marc Alff
b8579849f3 Bug#30087 Set query_cache_size, if the value is too small, get a unclear warning
Reverting the previous patch
2008-07-16 16:29:22 -06:00
Kristofer Pettersson
8857b3b716 Auto merged 2008-07-16 16:12:20 +02:00
Kristofer Pettersson
00149f36a5 merge 2008-07-16 14:34:54 +02:00
Georgi Kodinov
59ab9a0872 Bug#37830 : ORDER BY ASC/DESC - no difference
Range scan in descending order for c <= <col> <= c type of
ranges was ignoring the DESC flag.
However some engines like InnoDB have the primary key parts 
as a suffix for every secondary key.
When such primary key suffix is used for ordering ignoring 
the DESC is not valid.
But we generally would like to do this because it's faster.
      
Fixed by performing only reverse scan if the primary key is used.
Removed some dead code in the process.
2008-07-16 12:31:50 +03:00
Sergey Petrunia
63bfaa4634 Merge 2008-07-15 21:49:28 +04:00
Sergey Petrunia
eb8d8d3e3a Merge fix for BUG#35478 into 5.1 2008-07-15 21:46:02 +04:00
Kristofer Pettersson
44b4479541 auto merge 2008-07-15 17:29:26 +02:00
Sergey Petrunia
2951f00be4 BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
- In QUICK_INDEX_MERGE_SELECT::read_keys_and_merge: when we got table->sort from Unique,
  tell init_read_record() not to use rr_from_cache() because a) rowids are already sorted
  and b) it might be that the the data is used by filesort(), which will need record rowids
  (which rr_from_cache() cannot provide).
- Fully de-initialize the table->sort read in QUICK_INDEX_MERGE_SELECT::get_next(). This fixes BUG#35477.
(bk trigger: file as fix for BUG#35478).
2008-07-15 18:13:21 +04:00
Gleb Shchepa
47cf24a166 merge from local tree to 5.1-bugteam 2008-07-15 17:15:11 +05:00
Gleb Shchepa
2f207e4a34 after-push patch: partial rollback of bug #37761 fix.
Note: item->null_value is not updated before a call to
item->store(), item->is_null() is not too (in common case).
2008-07-15 17:12:08 +05:00
Marc Alff
566e3389c2 Bug#35577, manual merge mysql-5.0-bugteam -> mysql-5.1-bugteam 2008-07-14 19:43:12 -06:00
Marc Alff
504f7e2d0f Merge 2008-07-14 15:47:34 -06:00
Marc Alff
0816ee6d34 Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
build)

The crash was caused by freeing the internal parser stack during the parser
execution.
This occured only for complex stored procedures, after reallocating the parser
stack using my_yyoverflow(), with the following C call stack:
- MYSQLparse()
- any rule calling sp_head::restore_lex()
- lex_end()
- x_free(lex->yacc_yyss), xfree(lex->yacc_yyvs)

The root cause is the implementation of stored procedures, which breaks the
assumption from 4.1 that there is only one LEX structure per parser call.

The solution is to separate the LEX structure into:
- attributes that represent a statement (the current LEX structure),
- attributes that relate to the syntax parser itself (Yacc_state),
so that parsing multiple statements in stored programs can create multiple
LEX structures while not changing the unique Yacc_state.

Now, Yacc_state and the existing Lex_input_stream are aggregated into
Parser_state, a structure that represent the complete state of the (Lexical +
Syntax) parser.
2008-07-14 15:41:30 -06:00
Ramil Kalimullin
bbecb19608 auto-merge 2008-07-14 15:57:56 +05:00
Gleb Shchepa
211164ff8c Bug #37761: IN handles NULL differently for table-subquery
and value-list

The server returns unexpected results if a right side of the 
NOT IN clause consists of NULL value and some constants of
the same type, for example:

  SELECT * FROM t WHERE NOT t.id IN (NULL, 1, 2) 
  
may return 3, 4, 5 etc if a table contains these values.


The Item_func_in::val_int method has been modified:
unnecessary resets of an Item_func_case::has_null field 
value has been moved outside of an argument comparison
loop. (Also unnecessary re-initialization of the null_value
field has been moved).
2008-07-14 14:06:49 +05:00
Horst Hunger
6d05a62e4a Fix of Bug#37997. Polling until disconnect is not more in the processlist 2008-07-11 14:05:54 +02:00
Gleb Shchepa
9cc31df3b4 merge 5.0-bugteam --> 5.1-bugteam 2008-07-11 04:52:50 +05:00
Gleb Shchepa
52f510ef22 warning elimination 2008-07-11 04:51:58 +05:00
Gleb Shchepa
d4f4f83eb1 merge 5.0-bugteam -> 5.1-bugteam 2008-07-11 02:47:23 +05:00
Gleb Shchepa
04dc6639cc warning elimination 2008-07-11 02:32:54 +05:00
Marc Alff
0fe5b015de Fixed build warning on Windows (emb_qcache.cc) 2008-07-10 14:41:56 -06:00
Tatiana A. Nurnberg
d853a09163 auto-merge 2008-07-10 15:28:37 +02:00
Tatiana A. Nurnberg
8c249ba861 auto-merge 2008-07-10 15:25:20 +02:00
Tatiana A. Nurnberg
94607a836f Bug#35848: UUID() returns UUIDs with the wrong time
offset for time part in UUIDs was 1/1000 of what it
should be. In other words, offset was off.

Also handle the case where we count into the future
when several UUIDs are generated in one "tick", and
then the next call is late enough for us to unwind
some but not all of those borrowed ticks.

Lastly, handle the case where we keep borrowing and
borrowing until the tick-counter overflows by also
changing into a new "numberspace" by creating a new
random suffix.
2008-07-10 05:24:46 +02:00
Tatiana A. Nurnberg
2d41201c8a Bug#35848: UUID() returns UUIDs with the wrong time
offset for time part in UUIDs was 1/1000 of what it
should be. In other words, offset was off.

Also handle the case where we count into the future
when several UUIDs are generated in one "tick", and
then the next call is late enough for us to unwind
some but not all of those borrowed ticks.

Lastly, handle the case where we keep borrowing and
borrowing until the tick-counter overflows by also
changing into a new "numberspace" by creating a new
random suffix.
2008-07-10 03:58:30 +02:00
Gleb Shchepa
45e0d91d35 null merge 5.0-bugteam --> 5.1-bugteam 2008-07-10 03:13:42 +05:00
Gleb Shchepa
5d3f1aa09c merge 5.1-main --> 5.1-bugteam 2008-07-10 03:01:41 +05:00
Gleb Shchepa
d1f5280a5c merge 5.0-main --> 5.0-bugteam 2008-07-10 00:54:20 +05:00
Matthias Leich
c9ca782890 Upmerge 5.0 -> 5.1 2008-07-09 20:55:23 +02:00
Mattias Jonsson
5398187ba7 merge 2008-07-09 15:15:11 +02:00
Ramil Kalimullin
db56fd008c Fix for bug#37669: Server crash by setting "@@session.innodb_table_locks"
Problem: reading/writing data from/to an address without proper
alignment leads to SIGBUS on some platforms.

Fix: use the correct data type when dereferencing variable values.
2008-07-09 16:52:26 +05:00
Matthias Leich
7248199783 1. Fix for Bug#37160
"funcs_2: The tests do not check if optional character
               sets exist."
2. Minor cleanup
2008-07-09 13:22:07 +02:00