Commit graph

67404 commits

Author SHA1 Message Date
Luis Soares
1602ffb8ab BUG#57899: Certain reserved words should not be reserved
In MySQL 5.5 the new reserved words include:
SLOW                    as in FLUSH SLOW LOGS
GENERAL                 as in FLUSH GENERAL LOGS
IGNORE_SERVER_IDS       as in CHANGE MASTER ... IGNORE_SERVER_IDS
MASTER_HEARTBEAT_PERIOD as in CHANGE MASTER ... MASTER_HEARTBEAT_PERIOD

These are not reserved words in standard SQL, or in Oracle 11g,
and as such, may affect existing applications.

We fix this by adding the new words to the list of 
keywords that are allowed for labels in SPs.

mysql-test/t/keywords.test:
  Test case that checks that the target words can be used
  for naming fields in a table or as local routine variable
  names.
2010-11-03 14:51:52 +00:00
Tor Didriksen
a5eba94a1d Bug #52131: SET and ENUM stored endian-dependent in binary log
Post-Push fix, DBUG build broken on freebsd7

sql/field.cc:8456: warning: control reaches end of non-void function

sql/field.cc:
  Return NULL to keep compiler happy.
2010-10-29 11:35:07 +02:00
Georgi Kodinov
c3f923857a Bug #57774: Typos/ambiguities in the WL1054 comments
Fixed few typos and added better wording as suggested.
2010-10-27 18:12:17 +03:00
Vasil Dimov
a213162c0d Merge mysql-5.1-bugteam -> mysql-5.5-bugteam (empty) 2010-10-29 10:47:51 +03:00
Vasil Dimov
06a10d4bd3 Merge mysql-5.5-innodb -> mysql-5.5-bugteam 2010-10-29 10:46:21 +03:00
Vasil Dimov
23552ecd41 Merge mysql-5.1-innodb -> mysql-5.1-bugteam 2010-10-29 10:45:11 +03:00
Jimmy Yang
6f03e15cf9 Merge fix for bug#57616 from mysql-5.5-security to mysql-5.5-innodb. 2010-10-28 21:55:43 -07:00
Vasil Dimov
e3decfa0ae Fix a compilation warning:
/export/home/pb2/build/sb_0-2459340-1288264809.63/mysql-5.5.8-ga/storage/innobase/os/os0sync.c: In function 'os_cond_wait_timed':
/export/home/pb2/build/sb_0-2459340-1288264809.63/mysql-5.5.8-ga/storage/innobase/os/os0sync.c:184: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'time_t'
gmake[2]: *** [storage/innobase/CMakeFiles/innobase.dir/os/os0sync.c.o] Error 1
2010-10-28 20:12:23 +03:00
Mattias Jonsson
1a9083b94a post merge fix 2010-10-28 12:08:09 +02:00
Calvin Sun
8fc8e01f45 Null merge mysql-5.1-innodb --> mysql-5.5-innodb 2010-10-28 00:54:25 -05:00
Calvin Sun
ec51b47954 Bug#52062: Compiler warning in os0file.c on windows 64-bit
On Windows, the parameter for number of bytes passed into WriteFile()
and ReadFile() is DWORD. Casting is needed to silence the warning on
64-bit Windows.

Also, adding several asserts to ensure the variable for number of bytes
is no more than 32 bits, even on 64-bit Windows.

rb://415
Approved by: Inaam
2010-10-28 00:34:53 -05:00
Calvin Sun
460ad14e04 Bug#52062: Compiler warning in os0file.c on windows 64-bit
On Windows, the parameter for number of bytes passed into WriteFile()
and ReadFile() is DWORD. Casting is needed to silence the warning on
64-bit Windows.

Also, adding several asserts to ensure the variable for number of bytes
is no more than 32 bits, even on 64-bit Windows.

This is for InnoDB Plugin.

rb://415
Approved by: Inaam
2010-10-28 00:10:28 -05:00
Calvin Sun
16feea4109 Bug#52062: Compiler warning in os0file.c on windows 64-bit
On Windows, the parameter for number of bytes passed into WriteFile()
and ReadFile() is DWORD. Casting is needed to silence the warning on
64-bit Windows.

Also, adding several asserts to ensure the variable for number of bytes
is no more than 32 bits, even on 64-bit Windows.

This is for built-in InnoDB.

rb://415
Approved by: Inaam
2010-10-27 23:18:59 -05:00
Calvin Sun
3fb574bf03 Fixed a C89 violation when atomic builtins are not defined, causing
a compile error with MSVC. The problem was introduced in Revision: 3150
revid:marko.makela@oracle.com-20100809085837-s1nfx6gjf7l6ttab
2010-10-27 17:06:20 -05:00
Mats Kindahl
f523b5771a Merging patch for BUG#52131 with mysql-5.5-bugteam. 2010-10-27 23:12:45 +02:00
Marko Mäkelä
712beace38 Fix a bogus debug assertion in the fix of Bug #57707.
buf_pool_init(): Replace ut_ad(n_instances < MAX_BUFFER_POOLS)
with ut_ad(n_instances <= MAX_BUFFER_POOLS).
(Spotted by Michael Izioumtchenko.)
Add ut_ad(n_instances > 0).
2010-10-27 21:50:45 +03:00
Vasil Dimov
a882351b4f Merge mysql-5.1-innodb -> mysql-5.5-innodb (empty diff) 2010-10-27 16:43:29 +03:00
Vasil Dimov
e3021d2a8c Merge mysql-5.5-bugteam -> mysql-5.5-innodb 2010-10-27 16:41:26 +03:00
Vasil Dimov
4bf273c8f1 Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-10-27 16:39:22 +03:00
Marko Mäkelä
26d81a2a98 Bug #57707 InnoDB buf_page_t size has doubled on 32-bit systems
buf_page_t: Remove the buf_pool pointer. Add buf_pool_index:6 next to
buf_fix_count:19 (it was buf_fix_count:25). This will limit the number
of concurrent transactions to somewhere around 524,288.

buf_pool_index(buf_pool): A new function to determine the index of a
buffer pool in buf_pool_ptr[].

buf_pool_ptr: Make this a dynamically allocated array instead of an
array of pointers. Allocate the array in buf_pool_init() and free in
buf_pool_free().

buf_pool_free_instance(): No longer free the buf_pool object, as it is
allocated from a big array.

buf_pool_from_bpage(), buf_pool_from_block(): Move the definitions to
the beginning of the files, because some compilers have (had) problems
with forward definitions of inline functions. Calculate the buffer
pool from buf_pool_index.

buf_pool_from_array(): Add debug assertions for input validation.
2010-10-27 09:56:56 +03:00
Marko Mäkelä
0fbc74a451 Bug #57730 Clean up references to InnoDB Plugin
CMakeLists.txt: Remove the checks for mysql_storage_engine.cmake
and MYSQL_VERSION_ID.

ha_innodb.cc, ha_innodb.h: Remove the checks for MYSQL_VERSION_ID.
2010-10-27 09:54:20 +03:00
Anitha Gopi
fcfda43ca3 Fixed bug numbers in disabled.def files 2010-10-27 09:54:04 +05:30
Inaam Rana
431e3ee7c6 Fix compiler warning introduced by previous commit. 2010-10-26 21:45:58 -04:00
Inaam Rana
1c3dc21f2a Bug #57611 ibdata file and continuous growing undo logs
rb://498
  
  Fix handling of update_undo_logs at trx commit. Previously, when
  rseg->update_undo_list grows beyond 500 the update_undo_logs were
  marked with state TRX_UNDO_TO_FREE which should have been
  TRX_UNDO_TO_PURGE.
  In 5.5 we don't need the heuristic as we support multiple rollback
  segments.
  
  Approved by: Sunny Bains
2010-10-26 17:06:24 -04:00
Inaam Rana
29d62e4cd4 Null merge mysql-5.1-innodb to mysql-5.5-innodb 2010-10-26 17:03:28 -04:00
Inaam Rana
26738c280f Bug #57611 ibdata file and continuous growing undo logs
rb://498

Fix handling of update_undo_logs at trx commit. Previously, when
rseg->update_undo_list grows beyond 500 the update_undo_logs were
marked with state TRX_UNDO_TO_FREE which should have been
TRX_UNDO_TO_PURGE.

Approved by: Sunny Bains
2010-10-26 16:54:18 -04:00
unknown
840c602e83 Bug#57720 - Windows Vista and possibly Windows 7 can return ERROR_TIMEOUT instead of WAIT_TIMEOUT from calls to SleepConditionVariableCS() which is used in os0sync.c; os_cond_wait_timeout() where it is mapped to sleep_condition_variable().
Consider ERROR_TIMEOUT to be a timeout just like WAIT_TIMEOUT.  

In addition, test for EINTR as a possible return value from pthread_cond_timeout() in the posix section of os_cond_wait_timeout(), even though it is not supposed to be returned, but just to be safe.
2010-10-26 14:18:31 -05:00
Georgi Kodinov
ef7982fd17 Bug #57689: mysql_change_user() breaks user connection on older clients
COM_CHANGE_USER was always handled like an implicit request to change the
client plugin, so that the client can re-use the same code path for both normal 
login and COM_CHANGE_USER. However this doesn't really work well with old 
clients because they don't understand the request to change a client plugin.

Fixed by implementing a special state in the code (and old client issuing 
COM_CHANGE_USER). In this state the server parses the COM_CHANGE_USER 
package and pushes back the password hash, the user name and the database 
to the input stream in the same order that the native password server side plugin 
expects. As a result it replies with an OK/FAIL just like the old server does thus
making the new server compatible with older clients.

No test case added, since it would requre an old client binary. Tested using 
accounts with and without passwords. Tested with a correct and incorrect 
password.
2010-10-25 18:11:58 +03:00
Georgi Kodinov
bda4655eb9 merge 2010-10-27 09:34:03 +02:00
Georgi Kodinov
50d18aa2d5 merge 2010-10-27 09:32:26 +02:00
Alexander Nozdrin
02ca1fe3f1 Follow-up for Bug#55850: update funcs_1 result files. 2010-10-27 11:16:52 +04:00
Anitha Gopi
3cc4cdf160 Up merge revision 3547 from 5.1. Enable sp_sync test since Bug 48157 is fixed 2010-10-27 11:04:48 +05:30
Marc Alff
c039e82497 Fixed test result 2010-10-26 19:35:02 +02:00
Alexander Nozdrin
e86b6c0db4 Patch for Bug#55850 (Trigger warnings not cleared).
The problem was that the warnings risen by a trigger were not cleared upon
successful completion. The warnings should be cleared if the trigger completes
successfully.

The fix is to skip merging warnings into caller's Warning Info for triggers.
2010-10-26 15:48:08 +04:00
Marc Alff
b431da6214 local merge 2010-10-26 11:02:32 +02:00
Bjorn Munch
dca17350be null upmerge 2010-10-26 08:31:22 +02:00
Bjorn Munch
32c86a488d merge from 5.5-mtr 2010-10-26 08:30:02 +02:00
Kristofer Pettersson
29f3d85df1 automerge 2010-10-25 18:21:28 +02:00
Tor Didriksen
56f6599e7c Bug#45288: pb2 returns a lot of compilation warnings
sql/sql_lex.h:1437: warning: control reaches end of non-void function


sql/sql_lex.h:
  Make compiler happy, by adding a return statement.
2010-10-25 17:08:27 +02:00
Bjorn Munch
676e012e47 merge from 5.1-mtr 2010-10-25 15:48:41 +02:00
Kristofer Pettersson
4b36063336 Bug#54569 Some options are not allowed to take argument when passed with loose- prefix
Boolean options cause parsing failures when they are given
with prefix loose- and an argument, either in the command
line or in configuration file.

The reason was a faulty logic which forced the parsing
to throw an error when an argument of type NO_ARG was
used together with an argument which has been identified
as a key-value pair. Despite the attribute NO_ARG these
options actually take arguments if they are of type
BOOL.


include/my_getopt.h:
  * More comments to help future refactoring
mysys/my_getopt.c:
  * removed if-statement which prevented logic for handling boolean types with arguments to be executed.
  * Added comments to aid in future refactoring.
2010-10-25 14:30:07 +02:00
Bjorn Munch
56354413f8 Revert simplified if() in mysql-test/include/show_events.inc 2010-10-25 14:07:28 +02:00
Horst.Hunger
06a263e2b3 Due to failing on Freebsd. 2010-10-25 12:24:26 +02:00
Jimmy Yang
d96b0e5801 merge from mysql-5.1-innodb to mysql-5.5-innodb. 2010-10-25 00:02:03 -07:00
Jimmy Yang
112684b0ba Fix bug #57700 Latching order violation in row_truncate_table_for_mysql().
Approved by Sunny Bains
2010-10-24 22:51:21 -07:00
unknown
089ab763f5 Manual merge 2010-10-23 21:09:27 +08:00
unknown
06c49d571b Bug#27606 GRANT statement should be replicated with DEFINER information
"Grantor" columns' data is lost when replicating mysql.tables_priv.
Slave SQL thread used its default user ''@'' as the grantor of GRANT|REVOKE
statements executing on it.

In this patch, current user is put in query log event for all GRANT and REVOKE
statement, SQL thread uses the user in query log event as grantor.


mysql-test/suite/rpl/r/rpl_do_grant.result:
  Add test for this bug.
mysql-test/suite/rpl/t/rpl_do_grant.test:
  Add test for this bug.
sql/log_event.cc:
  Refactoring THD::current_user_used and related functions.
  current_user_used is used to judge if current user should be
  binlogged in query log event. So it is better to call it m_binlog_invoker.
  The related functions are renamed too.
sql/sql_class.cc:
  Refactoring THD::current_user_used and related functions.
  current_user_used is used to judge if current user should be
  binlogged in query log event. So it is better to call it m_binlog_invoker.
  The related functions are renamed too.
sql/sql_class.h:
  Refactoring THD::current_user_used and related functions.
  current_user_used is used to judge if current user should be
  binlogged in query log event. So it is better to call it m_binlog_invoker.
  The related functions are renamed too.
sql/sql_parse.cc:
  Call binlog_invoker() for GRANT and REVOKE statements.
2010-10-23 20:55:44 +08:00
Jon Olav Hauglid
1ecc17737f Merge from mysql-5.5-runtime to mysql-5.5-bugteam
No conflicts
2010-10-22 14:13:03 +02:00
Horst.Hunger
d63cbdde8e Due to issues with merge. 2010-10-22 10:20:17 +02:00
Jimmy Yang
1291c00477 Fix Bug #56791 Remove ios_mutex from InnoDB code
rb://495 approved by Inaam
2010-10-21 23:34:57 -07:00