Commit graph

54767 commits

Author SHA1 Message Date
Mikael Ronstrom
2c252ba96b Google SMP patch 2008-10-15 20:54:18 +02:00
Georgi Kodinov
772cdf0000 merged 5.0-bugteam to 5.1-bugteam 2008-09-10 12:55:38 +03:00
Georgi Kodinov
7f1734eb22 merged 5.1.29-rc into 5.1-bugteam 2008-09-10 12:44:21 +03:00
Georgi Kodinov
674d57be85 merged 5.0-5.1.29-rc -> 5.0-bugteam 2008-09-10 12:40:58 +03:00
Evgeny Potemkin
969ea5ed32 Merge 2008-09-10 12:44:38 +04:00
Ramil Kalimullin
237b86818c Merge 2008-09-09 21:24:33 +05:00
Ramil Kalimullin
12b953578c Merge 2008-09-09 20:52:38 +05:00
Martin Hansson
06e4f25fdc Bug#35600: Auto merged. 2008-09-09 17:30:36 +02:00
Ramil Kalimullin
707e676c58 Fix for bug#37526: asymertic operator <=> in trigger
Problem: <=> operator may return wrong results 
comparing NULL and a DATE/DATETIME/TIME value.

Fix: properly check NULLs.
2008-09-09 20:05:27 +05:00
Mats Kindahl
1aee4d9e3b Merging with 5.1-5.1.29-rc 2008-09-09 14:46:18 +02:00
Martin Hansson
0abc0eade2 Bug#35600: Security breach via view, I_S table and prepared
statement/stored procedure

View privileges are properly checked after the fix for bug no 
36086, so the method TABLE_LIST::get_db_name() must be used 
instead of field TABLE_LIST::db, as this only works for tables.
Bug appears when accessing views in prepared statements.
2008-09-09 12:49:08 +02:00
Mats Kindahl
69a8281c41 Bug #39106:
SUPER is not required to change binlog format for session

A user without SUPER privileges can change the value of the
session variable BINLOG_FORMAT, causing problems for a DBA.

This changeset requires a user to have SUPER privileges to
change the value of the session variable BINLOG_FORMAT, and
not only the global variable BINLOG_FORMAT.
2008-09-09 12:19:31 +02:00
Georgi Kodinov
f81c25e8b1 merge 5.1-5.1.29-rc to B38701 working tree 2008-09-08 14:51:09 +03:00
Ramil Kalimullin
9b8aa4683b Merge 2008-09-08 15:57:06 +05:00
Martin Hansson
3b9948ed86 Bug#36086: Auto merge. 2008-09-08 12:04:42 +02:00
Ramil Kalimullin
3d31690aa5 Merge 2008-09-08 14:55:38 +05:00
Georgi Kodinov
e953a26df5 Bug #38701: Crash in String::append when inserting duplicate empty strings an uft8
SET col
                  
When reporting a duplicate key error the server was making incorrect assumptions 
on what the state of the value string to include in the error is.

Fixed by accessing the data in this string in a "safe" way (without relying on it
having a terminating 0).
      
Detected by code analysis and fixed a similar problem in reporting the foreign key
duplicate errors.
2008-09-05 18:21:59 +03:00
Narayanan V
5220e3f4ea updating server version number 2008-09-05 20:20:26 +05:30
Narayanan V
061f38f61b WL#4380: abi_check rule (using gcc -E) for storage engine API
Added a rule that uses gcc to generate preprocessor
output (gcc -E) that can be compared to an already
generated output using the diff utility.

icheck has been removed and replaced by gcc -E
because icheck does not support C++.
2008-09-05 20:14:30 +05:30
Georgi Kodinov
b37078e94a merged 5.1-main -> 5.1-bugteam 2008-09-05 16:24:54 +03:00
Evgeny Potemkin
aa74a314e4 Bug#37908: Skipped access right check caused server crash.
The check_table_access function initializes per-table grant info and performs
access rights check. It wasn't called for SHOW STATUS statement thus left
grants info uninitialized. In some cases this led to server crash. In other
cases it allowed a user to check for presence/absence of arbitrary values in
any tables.
      
Now the check_table_access function is called prior to the statement
processing.
2008-09-05 14:44:16 +04:00
Ramil Kalimullin
b7a276f7ff After-merge fix. 2008-09-05 14:06:24 +05:00
Ramil Kalimullin
00d7c50e48 Merge 2008-09-05 13:36:02 +05:00
Ramil Kalimullin
0994c961a7 Fix for bug #39021: SELECT REGEXP BINARY NULL never returns
Problem: SELECT ... REGEXP BINARY NULL may lead to server crash/hang.

Fix: properly handle NULL regular expressions.
2008-09-05 13:30:01 +05:00
Ramil Kalimullin
cdec56dc85 Merge 2008-09-05 12:48:56 +05:00
Narayanan V
9e8851b158 merging mysql-5.1->mysql-5.1-sea 2008-09-04 17:23:16 +05:30
Mats Kindahl
565c4d2bb2 BUG#32709: Assertion failed: trx_data->empty(), file log.cc
Incremental fixes: updating a comment and fixing a result file.
2008-09-03 22:52:54 +02:00
Mats Kindahl
9755f07279 Bug #32709: Assertion failed: trx_data->empty(), file log.cc
The assertion indicates that some data was left in the transaction
cache when the server was shut down, which means that a previous
statement did not commit or rollback correctly.

What happened was that a bug in the rollback of a transactional
table caused the transaction cache to be emptied, but not reset.
The error can be triggered by having a failing UPDATE or INSERT,
on a transactional table, causing an implicit rollback.

Fixed by always flushing the pending event to reset the state
properly.
2008-09-03 22:04:07 +02:00
Martin Hansson
a43242ea6d Bug#36086: SELECT * from views don't check column grants
This patch also fixes bugs 36963 and 35600.
                      
- In many places a view was confused with an anonymous derived
  table, i.e. access checking was skipped. Fixed by introducing a
  predicate to tell the difference between named and anonymous
  derived tables.
                      
- When inserting fields for "SELECT * ", there was no 
  distinction between base tables and views, where one should be
  made. View privileges are checked elsewhere.
2008-09-03 16:45:40 +02:00
Andrei Elkin
83ce448cfe merging with 5.1.29. 2008-09-03 14:43:26 +03:00
Mats Kindahl
620a5faaf2 Updating result files for rpl_ndb test suite. 2008-09-03 12:27:01 +02:00
Ramil Kalimullin
ef13c12c0a Fix for bug#38821: Assert table->auto_increment_field_not_null failed
in open_table()

Problem: repeating "CREATE... ( AUTOINCREMENT) ... SELECT" may lead to
an assertion failure.

Fix: reset table->auto_increment_field_not_null after each record 
writing.
2008-09-03 15:17:19 +05:00
Andrei Elkin
21a08eabad Bug#36099 replicate-do-db affects replaying RBR events with mysqlbinlog
The replication filtering rules were inappropiately applied when
executing BINLOG pseudo-query.  The rules are supposed to be active
only at times when the slave's sql thread executes an event.
            
Fixed with correcting a condition to call replication rules only if
the slave sql thread executes the event.
2008-09-03 13:01:18 +03:00
Gleb Shchepa
2b0a534bb8 merge 5.0 --> 5.1 2008-09-03 13:06:03 +05:00
Gleb Shchepa
cfb4a66a5a merge with local tree 2008-09-03 12:59:48 +05:00
Gleb Shchepa
6f94324fd8 Bug #39002: The server crashes on the query:
INSERT .. SELECT .. ON DUPLICATE KEY UPDATE col=DEFAULT

In order to get correct values from update fields that
belongs to the SELECT part in the INSERT .. SELECT .. ON
DUPLICATE KEY UPDATE statement, the server adds referenced
fields to the select list. Part of the code that does this
transformation is shared between implementations of
the DEFAULT(col) function and the DEFAULT keyword (in
the col=DEFAULT expression), and an implementation of
the DEFAULT keyword is incomplete.
2008-09-03 12:32:43 +05:00
Magnus Svensson
1ac6fb4b2e Merge bug#31315 2008-09-02 11:14:13 +02:00
Magnus Svensson
447fa91d83 Bug#31315 mysql_install_db fails if a default table type of NDB is set in my.cnf
- Use myisam as default storage engine when running mysqld in --bootstrap mode
2008-09-02 10:53:30 +02:00
Vladislav Vaintroub
59edfa9261 null merge from bugteam-5.1 2008-09-01 17:51:54 -04:00
Vladislav Vaintroub
b2a49edd4e Bug#37226 Explicit call of my_thread_init() on Windows for every new thread.
Bug#33031 app linked to libmysql.lib crash if run as service in vista under 
localsystem
  

There are some problems using DllMain hook functions on Windows that 
automatically do global and per-thread initialization for libmysqld.dll

1)per-thread initialization(DLL_THREAD_ATTACH)
MySQL internally counts number of active threads that and causes a delay in in 
my_end() if not all threads are exited. But,there are threads that can be 
started either by Windows internally (often in TCP/IP scenarios) or by user 
himself - those threads are not necessarily using libmysql.dll functionality, 
but nonetheless the contribute to the count of open threads.

2)process-initialization (DLL_PROCESS_ATTACH)
my_init() calls WSAStartup that itself loads DLLs and can lead to a deadlock in 
Windows loader.

Fix is to remove dll initialization code from libmysql.dll in general case. I
still leave an environment variable LIBMYSQL_DLLINIT, which if set to any value 
will cause the old behavior (DLL init hooks will be called). This env.variable 
exists only to prevent breakage of existing Windows-only applications that 
don't do mysql_thread_init() and work ok today. Use of LIBMYSQL_DLLINIT is 
discouraged and it will be removed in 6.0
2008-09-01 17:46:37 -04:00
Vladislav Vaintroub
36266fc085 Fix "make dist" error - remove Visual Studio project files from
distribution
2008-09-01 17:27:14 -04:00
Davi Arnaut
7e8c13745e Restore tree name after merge from main. 2008-09-01 17:11:42 -03:00
Vladislav Vaintroub
6445c2deae Bug#37226 Explicit call of my_thread_init() on Windows for every new thread.
Bug#33031 app linked to libmysql.lib crash if run as service in vista under 
localsystem
  

There are some problems using DllMain hook functions on Windows that 
automatically do global and per-thread initialization for libmysqld.dll

1)per-thread initialization(DLL_THREAD_ATTACH)
MySQL internally counts number of active threads that and causes a delay in in 
my_end() if not all threads are exited. But,there are threads that can be 
started either by Windows internally (often in TCP/IP scenarios) or by user 
himself - those threads are not necessarily using libmysql.dll functionality, 
but nonetheless the contribute to the count of open threads.

2)process-initialization (DLL_PROCESS_ATTACH)
my_init() calls WSAStartup that itself loads DLLs and can lead to a deadlock in 
Windows loader.

Fix is to remove dll initialization code from libmysql.dll in general case. I
still leave an environment variable LIBMYSQL_DLLINIT, which if set to any value 
will cause the old behavior (DLL init hooks will be called). This env.variable 
exists only to prevent breakage of existing Windows-only applications that 
don't do mysql_thread_init() and work ok today. Use of LIBMYSQL_DLLINIT is 
discouraged and it will be removed in 6.0
2008-09-01 20:04:17 +02:00
Vladislav Vaintroub
828f3cb038 2008-09-01 19:10:04 +02:00
Vladislav Vaintroub
5334e5aead merge 2008-09-01 13:27:38 +02:00
Vladislav Vaintroub
c8d1e315f0 merge 2008-09-01 12:04:28 +02:00
Vladislav Vaintroub
4e97988b2c merge 2008-09-01 11:48:21 +02:00
Mats Kindahl
76cf340947 Post-merge fixes to update result files. 2008-09-01 11:27:41 +02:00
Mats Kindahl
bcec321d68 Merging 5.0-bugteam into 5.1-bugteam 2008-09-01 11:00:52 +02:00
Mats Kindahl
5214169192 Merging in 5.0-rpl into 5.0-bugteam 2008-09-01 10:19:17 +02:00