Commit graph

1919 commits

Author SHA1 Message Date
Sergey Vojtovich
7a77e3d05a Merge mysql-5.1-innodb_plugin to mysql-5.1. 2009-08-11 18:05:25 +05:00
Konstantin Osipov
31997022d7 Code review for Bug#43587 Putting event_scheduler=1 in init SQL file crashes
mysqld
2009-07-24 20:20:46 +04:00
Sergey Vojtovich
cc541211c8 Merge 5.1-bugteam -> 5.1-innodb_plugin. 2009-07-14 15:06:04 +05:00
Vladislav Vaintroub
31b79618e3 Backport WL#3653 to 5.1 to enable bundled innodb plugin.
Remove custom DLL loader code from innodb plugin code, use 
symbols exported from mysqld.
2009-06-10 10:59:49 +02:00
Magnus Blåudd
284a14edc5 Merge bug#45326 2009-06-05 13:23:58 +02:00
Magnus Blåudd
465d21a327 Bug#45326 Linker failure for libmysqld with VC++ 2008
- Rename the  functions in mysqld that conflict with the one in the
   external interface defined by mysql.h
2009-06-05 13:11:55 +02:00
Mattias Jonsson
fc4a287a1c merge into mysql-5.1-bugteam 2009-06-02 13:18:30 +02:00
Mattias Jonsson
9d23012269 Bug#32430:'show innodb status' causes errors Invalid (old?) table
or database name in logs

Problem was that InnoDB used filenam_to_tablename,
which do not handle partitions (due to the '#' in
the filename).

Solution is to add a new function for explaining
what the filename means: explain_filename.
It expands the database, table, partition and subpartition
parts and uses errmsg.txt for localization.
It also converts from my_charset_filename to system_charset_info
(i.e. human readable form for non ascii characters).
  http://lists.mysql.com/commits/70370

2773 Mattias Jonsson	2009-03-25

It has three different output styles.

NOTE: This is the server side ONLY part (introducing the explain_filename
function). There will be a patch for InnoDB using this function to solve
the bug.
2009-06-02 11:07:17 +02:00
Satya B
6999f40d75 merge to 5.1-bugteam tree 2009-06-02 13:44:41 +05:30
Alexey Kopytov
bdcce95f13 Manual merge. 2009-06-01 16:00:38 +04:00
Alexey Kopytov
2df531fdc4 Bug #44767: invalid memory reads in password() and
old_password() functions   
The PASSWORD() and OLD_PASSWORD() functions could lead to   
memory reads outside of an internal buffer when used with BLOB   
arguments.   
  
String::c_ptr() assumes there is at least one extra byte  
in the internally allocated buffer when adding the trailing  
'\0'.  This, however, may not be the case when a String object  
was initialized with externally allocated buffer.  
  
The bug was fixed by adding an additional "length" argument to  
make_scrambled_password_323() and make_scrambled_password() in  
order to avoid String::c_ptr() calls for  
PASSWORD()/OLD_PASSWORD().  
  
However, since the make_scrambled_password[_323] functions are  
a part of the client library ABI, the functions with the new  
interfaces were implemented with the 'my_' prefix in their  
names, with the old functions changed to be wrappers around  
the new ones to maintain interface compatibility.
2009-05-27 14:20:57 +04:00
Satya B
fe5121af67 Fix for BUG#10206 - InnoDB: Transaction requiring Max_BinLog_Cache_size > 4GB
always rollsback.

The global variable max_binlog_cache_size cannot be set more than 4GB on
32 bit systems, limiting transactions of all storage engines to 4G of changes.

The problem is max_binlog_cache_size is declared as ulong which is 4 bytes
on 32 bit and 8 bytes on 64 bit machines.

Fixed by using ulonglong for max_binlog_cache_size which is 8bytes on 32 
and 64 bit machines.The range for max_binlog_cache_size on 32 bit and 64 bit
systems is 4096-18446744073709547520 bytes.
2009-05-15 16:33:08 +05:30
Chad MILLER
128afdc3e5 Merge community up to enterprise, thus ending the community-server
adventure.
2009-05-06 09:06:32 -04:00
Chad MILLER
9d58239dea Pull 5.1 treatment of community features into 5.0. 2009-05-05 17:03:23 -04:00
Chad MILLER
978e8e06b0 Merge 5.0.80 release and 5.0 community. Version left at 5.0.80. 2009-04-14 13:20:13 -04:00
He Zhenxing
0b9d0592a5 Auto merge 2009-04-08 16:17:26 +08:00
Alexey Kopytov
3952372adb Automerge. 2009-03-27 15:59:09 +03:00
Alexey Kopytov
94926217d8 Manual merge. 2009-03-27 13:40:35 +03:00
Alexey Kopytov
afb2b6de68 Fix for bug #43432: Union on floats does unnecessary rounding
UNION could convert fixed-point FLOAT(M,D)/DOUBLE(M,D) columns  
to FLOAT/DOUBLE when aggregating data types from the SELECT  
substatements. While there is nothing particularly wrong with  
this behavior, especially when M is greater than the hardware  
precision limits, it could be confusing in cases when all  
SELECT statements in a union have the same  
FLOAT(M,D)/DOUBLE(M,D) columns with equal precision  
specifications listed in the same position.  
  
Since the manual is quite vague on what data type should be  
returned in such cases, the bug was fixed by implementing the  
most 'expected' behavior: do not convert FLOAT(M,D)/DOUBLE(M,D)  
to anything else if all SELECT statements in a UNION have the  
same precision for that column.
2009-03-27 13:12:50 +03:00
He Zhenxing
9530126822 BUG#37145 Killing a statement doing DDL may log binlog event with error code 1053
When the thread executing a DDL was killed after finished its
execution but before writing the binlog event, the error code in
the binlog event could be set wrongly to ER_SERVER_SHUTDOWN or
ER_QUERY_INTERRUPTED.

This patch fixed the problem by ignoring the kill status when
constructing the event for DDL statements.

This patch also included the following changes in order to
provide the test case.

 1) modified mysqltest to support variable for connection command

 2) modified mysql-test-run.pl, add new variable MYSQL_SLAVE to
    run mysql client against the slave mysqld.
2009-03-27 13:19:50 +08:00
Sergey Petrunia
ae3a1b8c06 Fix wrong parameter name which caused compile failure on windows 2009-03-16 20:45:03 +03:00
Sergey Petrunia
f7098d5ada Merge 2009-03-14 22:04:31 +03:00
Sergey Petrunia
c7e44fddfc @@optimizer_switch backport and change from no_xxx to xx=on|off: post-review fixes 2009-03-14 21:58:23 +03:00
Sergey Glukhov
390afdd16e Bug#42610 Dynamic plugin broken in 5.1.31
--added ability to obtain plugin variables from my.cnf on INSTALL PLUGIN stage
--option 'ignore-builtin-innodb' disables all InnoDB builtin plugins
  (including I_S plugins)
2009-03-13 12:51:25 +04:00
Sergey Petrunia
7877de39fd Change optimizer_switch from no_xxx to xxx=on/xx=off. 2009-03-11 23:13:39 +03:00
Sergey Petrunia
614f227020 Merge 2009-03-10 00:53:38 +03:00
Alexey Botchkov
d5de8c76e6 merging. 2009-02-24 15:29:49 +04:00
Sergey Petrunia
e08a5318d5 - Backport @@optimizer_switch support from 6.0
- Add support for setting it as a server commandline argument
- Add support for those switches:
  = no_index_merge
  = no_index_merge_union
  = no_index_merge_sort_union
  = no_index_merge_intersection
2009-02-23 19:16:48 +03:00
Ramil Kalimullin
ff8229fbef Fix for bug#21476: stack overflow crashes server; error-message
stack reservation too small

Problem: some tests fail on HP-UX due to insufficient stack reservation.

Fix: increase stack reservation.
2009-02-14 14:40:22 +04:00
Sergey Glukhov
53eed773e3 Bug#42610 Dynamic plugin broken in 5.1.31
added ignore-builtin-innodb option which disabled
initialization of builtin InnoDB plugin
2009-02-09 19:03:52 +04:00
Chad MILLER
f68ccd024a Merge from Tim's 5.0.76-release tree to make 5.0.77 . 2009-01-21 13:45:23 -05:00
Davi Arnaut
cf5dd72ee0 Merge from 5.0-bugteam 2009-01-15 08:28:10 -02:00
Ramil Kalimullin
347762946e Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.

Problem:
1. trigger code didn't assume a table name may have
a "#mysql50#" prefix, that may lead to a failing ASSERT().
2. "ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME" failed
for databases with "#mysql50#" prefix if any trigger.
3. mysqlcheck --fix-table-name didn't use UTF8 as a default
character set that resulted in (parsing) errors for tables with
non-latin symbols in their names and definitions of triggers.

Fix:
1. properly handle table/database names with "#mysql50#" prefix.
2. handle --default-character-set mysqlcheck option;
if mysqlcheck is launched with --fix-table-name or --fix-db-name
set default character set to UTF8 if no --default-character-set
option given.

Note: if given --fix-table-name or --fix-db-name option,
without --default-character-set mysqlcheck option
default character set is UTF8.
2009-01-14 18:50:51 +04:00
Davi Arnaut
918a038165 Bug#36326: nested transaction and select
The problem is that the query cache stores packets containing
the server status of the time when the cached statement was run.
This might lead to a wrong transaction status in the client side
if a statement is cached during a transaction and is later served
outside a transaction context (and vice-versa).

The solution is to take into account the transaction status when
storing in and serving from the query cache.
2009-01-13 20:07:06 -02:00
Georgi Kodinov
8c25823f94 merged 5.1-main -> 5.1-bugteam 2009-01-05 18:10:20 +02:00
Sergey Glukhov
b5f005f65a Bug#41079 information_schema.schema_privileges is limited to 7680 records.
The problem is that we cannot insert new record into memory table
when table size exceeds max memory table size.
The fix is to use schema_table_store_record() function which
converts memory table into MyISAM in case of table size exceeding.

Note:
There is no test case for this bug, the reason is that
1. The code  that was added already is checked(i.e. works) with existing tests
2. Correct work of schema_table_store_record() is checked with other test cases
   (information_schema tests)
So new code is fully covered with existing test cases.
2008-12-23 18:56:08 +04:00
Sergey Glukhov
429409eb19 5.0-bugteam->5.1-bugteam merge 2008-12-23 18:21:01 +04:00
Sergey Glukhov
26e804d0a7 Bug#37575 UCASE fails on monthname
The MONTHNAME/DAYNAME functions
returns binary string, so the LOWER/UPPER functions
are not effective on the result of MONTHNAME/DAYNAME call.  
Character set of the MONTHNAME/DAYNAME function
result has been changed to connection character set.
2008-12-23 18:08:04 +04:00
Chad MILLER
1c73da70ce Merged from 5.0 (enterprise). 2008-12-17 15:01:34 -05:00
Joerg Bruehe
c7d03ca35b Merge main 5.1 into 5.1-build 2008-12-10 21:14:50 +01:00
Vladislav Vaintroub
4dfbf2ec93 Bug#38522: 5 seconds delay when closing application using embedded server
The problem here is that embedded server starts handle_thread manager 
thread  on mysql_library_init() does not stop it on mysql_library_end().
At shutdown, my_thread_global_end() waits for thread count to become 0,
but since we did not stop the thread it will give up after 5 seconds.
             
Solution is to move shutdown for handle_manager thread from kill_server()
(mysqld specific) to clean_up() that is used by both embedded and mysqld.
            
This patch also contains some refactorings - to avoid duplicate code,
start_handle_manager() and stop_handle_manager() functions are introduced.
Unused variables are eliminated. handle_manager does not rely on global
variable abort_loop anymore to stop (abort_loop is not set for embedded).
            
Note: Specifically on Windows and when using DBUG version of libmysqld, 
the complete solution requires removing obsolete code my_thread_init() 
from my_thread_var(). This has a side effect that a DBUG statement 
after my_thread_end() can cause thread counter to be incremented, and 
embedded will hang for some seconds. Or worse, my_thread_init() will 
crash if critical sections have been deleted by the global cleanup 
routine that runs in a different thread. 

This patch also fixes and revert prior changes for Bug#38293 
"Libmysqld crash in mysql_library_init if language file missing".

Root cause of the crash observed in Bug#38293  was bug in my_thread_init() 
described above
2008-12-04 19:41:53 +01:00
Tatiana A. Nurnberg
92c8ab0867 auto-merge 2008-11-27 17:32:34 +01:00
Tatiana A. Nurnberg
99fe5e523e auto-merge 2008-11-27 17:17:16 +01:00
Sergey Glukhov
04824289dd 5.0-bugteam->5.1-bugteam merge 2008-11-27 18:11:54 +04:00
Sergey Glukhov
2fb574214e Bug#37460 Assertion failed: !table->file || table->file->inited == handler::NONE
enable uncacheable flag if we update a view with check option
and check option has a subselect, otherwise, the check option
can be evaluated after the subselect was freed as independent
(See full_local in JOIN::join_free())
2008-11-27 17:57:34 +04:00
Tatiana A. Nurnberg
9700cd87d9 auto-merge 2008-11-27 12:33:04 +01:00
Tatiana A. Nurnberg
ae0c6a949c Bug#37553: MySql Error Compare TimeDiff & Time
We pretended that TIMEDIFF() would always return positive results;
this gave strange results in comparisons of the TIMEDIFF(low,hi)<TIME(0)
type that rendered a negative result, but still gave false in comparison.
We also inadvertantly dropped the sign when converting times to
decimal.

CAST(time AS DECIMAL) handles signs of the times correctly.
TIMEDIFF() marked up as signed. Time/date comparison code switched to
signed for clarity.
2008-11-26 09:28:17 +01:00
Build Team
366adeab08 Added "Sun Microsystems, Inc." to copyright headers on files modified
since Oct 1st
2008-11-10 21:21:49 +01:00
Alexey Botchkov
da1d159fbf Bug#39289 libmysqld.a calls exit() upon error
Several functions (mostly in mysqld.cc) directly call
exit() function in case of errors, which is not a desired
behaviour expecially in the embedded-server library.

Fixed by making these functions return error sign instead
of exiting.

per-file comments:
  include/my_getopt.h
Bug#39289 libmysqld.a calls exit() upon error 
  added 'error' retvalue for my_getopt_register_get_addr

  libmysqld/lib_sql.cc
Bug#39289 libmysqld.a calls exit() upon error 
  unireg_clear() function implemented

  mysys/default.c
Bug#39289 libmysqld.a calls exit() upon error 
  error returned instead of exit() call

  mysys/mf_tempdir.c
Bug#39289 libmysqld.a calls exit() upon error 
  free_tmpdir() - fixed so it's not produce crash on uninitialized
    tmpdir structure

  mysys/my_getopt.c
Bug#39289 libmysqld.a calls exit() upon error 
  error returned instead of exit() call

  sql/mysql_priv.h
Bug#39289 libmysqld.a calls exit() upon error 
  unireg_abort definition fixed for the embedded server

  sql/mysqld.cc
Bug#39289 libmysqld.a calls exit() upon error 
  various functions fixed
  error returned instead of exit() call
2008-10-27 13:57:59 +04:00
Sergey Glukhov
524eb067e0 5.0->5.1 bugteam merge 2008-10-02 17:53:08 +05:00