Commit graph

54794 commits

Author SHA1 Message Date
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
mysqldev
e41daab5c4 Set version number to 5.1.27 2008-07-14 16:46:35 +02:00
Sven Sandberg
361458c643 BUG#37975: wait_for_slave_* should increase the timeout
Post-push fixes: forgot to commit an updated result file.
2008-07-14 16:06:03 +02:00
Ramil Kalimullin
bbecb19608 auto-merge 2008-07-14 15:57:56 +05:00
Joerg Bruehe
b034f04247 Merge main 5.1 to 5.1-build 2008-07-14 12:50:31 +02:00
Joerg Bruehe
9a95278a9e Merge main 5.0 into 5.0-build 2008-07-14 12:39:32 +02:00
Sven Sandberg
af598eccdc BUG#37975: wait_for_slave_* should increase the timeout
Post-push fixes: I forgot to include the new files
start_slave.inc and stop_slave.inc in the previuos push.
2008-07-14 11:41:23 +02: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
Sven Sandberg
c697802855 local merge in 5.1-rpl 2008-07-14 10:31:07 +02:00
Joerg Bruehe
241581fb8d Merge 5.1.26-rc to 5.1-build for further pushing it to the main tree. 2008-07-11 20:51:10 +02: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
Sven Sandberg
a49577cc2f test case rpl.rpl000018 does not exist but has option files.
removing the option files
2008-07-10 19:25:04 +02:00
Sven Sandberg
78c8bfdddf BUG#37975: wait_for_slave_* should increase the timeout
Problem 1: tests often fail in pushbuild with a timeout when waiting
for the slave to start/stop/receive error.
Fix 1: Updated the wait_for_slave_* macros in the following way:
- The timeout is increased by a factor ten
- Refactored the macros so that wait_for_slave_param does the work for
the other macros.
Problem 2: Tests are often incorrectly written, lacking a
source include/wait_for_slave_to_[start|stop].inc.
Fix 2: Improved the chance to get it right by adding
include/start_slave.inc and include/stop_slave.inc, and updated tests
to use these.
Problem 3: The the built-in test language command
wait_for_slave_to_stop is a misnomer (does not wait for the slave io
thread) and does not give as much debug info in case of failure as
the otherwise equivalent macro
source include/wait_for_slave_sql_to_stop.inc
Fix 3: Replaced all calls to the built-in command by a call to the
macro.
Problem 4: Some, but not all, of the wait_for_slave_* macros had an
implicit connection slave. This made some tests confusing to read,
and made it more difficult to use the macro in circular replication
scenarios, where the connection named master needs to wait.
Fix 4: Removed the implicit connection slave from all
wait_for_slave_* macros, and updated tests to use an explicit
connection slave where necessary.
Problem 5: The macros wait_slave_status.inc and wait_show_pattern.inc
were unused. Moreover, using them is difficult and error-prone.
Fix 5: remove these macros.
Problem 6: log_bin_trust_function_creators_basic failed when running
tests because it assumed @@global.log_bin_trust_function_creators=1,
and some tests modified this variable without resetting it to its
original value.
Fix 6: All tests that use this variable have been updated so that
they reset the value at end of test.
2008-07-10 18:09:39 +02: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
Mats Kindahl
87d1603700 Ensuring that master and slave both issue a RESET MASTER and RESET SLAVE
when resetting replication tests.  If not, circular replication setups
will leave cruft in the slaves binary log.
2008-07-09 14:34:00 +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
Joerg Bruehe
0241877c57 Merge main 5.1 into 5.1-build 2008-07-09 13:25:31 +02: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
Mattias Jonsson
e438f9f29d Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
The problem is that relying on the output of the 'ls' command is not
portable as its behavior is not the same between systems and it might
even not be available at all in (Windows).

So I added list_files that relies on the portable mysys library instead.
(and also list_files_write_file and list_files_append_file,
since the test was using '--exec ls' in that way.)
2008-07-09 13:19:04 +02:00
Joerg Bruehe
d9289b8832 Merge from main 5.0 to 5.0-build. 2008-07-09 13:17:53 +02:00
Georgi Kodinov
28e02b178f fixed a compilation warning on windows 64. 2008-07-09 13:03:48 +03:00
Georgi Kodinov
ed30164161 automatic merge of 5.0-bugteam into the 5.0.66 release clone. 2008-07-09 12:59:28 +03:00
kent@mysql.com
443698a56d Raise version number after cloning 5.0.66 2008-07-09 08:23:30 +02:00
Marc Alff
449d359fa0 Fixed remaining test failure 2008-07-08 13:17:28 -06:00
Mats Kindahl
c416c0e14c Patch to remove extreneous printout. 2008-07-08 19:59:50 +02:00
Daniel Fischer
0bb92b600e let's make a real honest attempt at finding the daemons in libexec 2008-07-08 19:17:06 +02:00
Marc Alff
6affa021b6 Cleanup merge issues in mysql-test/t/parser.test 2008-07-08 10:33:09 -06:00
Marc Alff
d61bc87c58 Bug#37525 funcs_1: <engine>_storedproc.test fail
Fixed the test to expect the correct result.
The previous test script was in fact affected by 26030,
and wrongly expected a ER_PARSE_ERROR error.
2008-07-08 10:32:02 -06:00
Mats Kindahl
94a1577689 Manual merge with mysql-5.1-rpl 2008-07-08 18:23:09 +02:00
Mats Kindahl
f7c41e2f1d Bug #37939 rpl_row_stop_middle_update fails sporadically on pushbuild
Bug #37940    rpl_dual_pos_advance fails sporadically on pushbuild,fail wait_for_slave_to_stop
Bug #37941    rpl_flushlog_loop fails sporadically on pushbuild
  
Several tests fail when waiting for the slave to stop in what
appears to be timeouts caused by a timeout value set to low. 
This causes false failures when the servers are loaded.
  
In order to try to avoid false negatives, we increase the
timeout 10 times and also print some more information in the
event that the slave fails to stop when expected to.
  
We add a printout of the current processes running to be able
to see if any process have been executing for an unexpectedly
long time, and also print the binlog events at the position
indicated by SHOW SLAVE STATUS.
2008-07-08 18:21:02 +02:00
Jonathan Perkin
38ae5d102a Merge from trunk. 2008-07-08 16:39:44 +02:00
Mats Kindahl
e8e7fdb786 Manual merge of mysql-5.0-bugteam -> mysql-5.1-bugteam 2008-07-08 13:18:34 +02:00
Sven Sandberg
9a10e967b3 merged in disabled test cases 2008-07-08 12:59:23 +02:00
Sven Sandberg
6af2959400 BUG#37962: *_func tests containing sleeps/race conditions
This is not a fix, it just disables the erroneous test cases.
2008-07-08 12:56:05 +02:00
Mats Kindahl
a129837f66 Manual merge with mysql-5.0-bugteam 2008-07-08 10:37:42 +02:00
Mattias Jonsson
de35ca0da9 merge (update of 51-bugteam, during testing for pushing...) 2008-07-08 01:05:16 +02:00