Commit graph

4160 commits

Author SHA1 Message Date
Alexander Barkov
e02ad98c63 Merge 5.5 -> 10.0-base 2013-11-08 20:59:08 +04:00
Michael Widenius
6cc9f4ac5c Added usage of handler error names to mysqltest
include/CMakeLists.txt:
  Added handler_ername.h
include/handler_ername.h:
  Names of handler error messages
mysql-test/extra/binlog_tests/binlog.test:
  Test using handler error names
mysql-test/r/mysqltest.result:
  Update for new error message
mysql-test/t/auto_increment.test:
  Test using handler error names
mysql-test/t/auto_increment_ranges.inc:
  Test using handler error names
mysql-test/t/replace.test:
  Test using handler error names
2013-11-05 20:30:36 +02:00
Alexander Barkov
1a3bb9487d A follow-up for the previous commit:
MDEV-4425 Regexp enhancements
Adding ${CMAKE_BINARY_DIR}/pcre into search path for *.h files.
Needed for find pcre.h (which is generated from pcre.h.in) when
build directory != source directory.
2013-10-02 15:41:15 +04:00
Alexander Barkov
458b4da7f3 MDEV-4425: moving the bundled pcre include directory earlier,
to avoid system *.h files to be included (e.g. like on labrador).
2013-10-01 11:43:39 +04:00
Alexander Barkov
038554ec96 Always include the local copy of pcre.h and pcreposix.h instead of the
system installed (if any).
2013-09-30 13:51:05 +04:00
Alexander Barkov
7fe391adbf Fixing compilation failure on Windows.
"PCRE_STATIC" must be defined before including pcre.h
to avoid linking errors:
- unresolved external symbol __imp_regerror
- unresolved external symbol __imp_pcre_exec
2013-09-27 16:29:05 +04:00
Alexander Barkov
285e7aa179 MDEV-4425 REGEXP enhancements 2013-09-26 18:02:17 +04:00
unknown
9d83468e78 merge 5.5 -> 10.0-base 2013-09-25 21:07:06 +03:00
Sergei Golubchik
4ec2e9d7ed 5.5 merge and fixes for compiler/test errors 2013-09-18 13:07:31 +02:00
Sergey Vojtovich
45d3ada7c2 MDEV-4684 - Enhancement request: --init-command support for mysqlslap
Added --init-command argument to mysqlslap: SQL Command to execute
when connecting to MySQL server. Will automatically be re-executed
when reconnecting.
2013-09-17 18:51:14 +04:00
Sergei Golubchik
42f56557f5 MDEV-4941 make: AIX fails with 'Identifier not allowed in cast'; syntax error in include/my_global.h
C++ comments in C files, and a typo in my_global.h
2013-09-09 19:31:29 +02:00
Sergei Golubchik
b838d081ad mysql-5.5.33 merge 2013-09-06 22:31:30 +02:00
unknown
35b2883643 merge 5.5 -> 10.0-base 2013-08-20 14:48:29 +03:00
Sergei Golubchik
b718dc449b mysql --skip-column-names flag should not affect alignment of field values,
set num_flag[] unconditionally, not under "if (column_names)"

http://ronaldbradford.com/blog/unexplained-trivial-mysql-behavior-2013-08-02/
2013-08-08 13:33:15 +02:00
Sergei Golubchik
97e640b9ae 5.5 merge 2013-07-17 21:24:29 +02:00
Sergei Golubchik
005c7e5421 mysql-5.5.32 merge 2013-07-16 19:09:54 +02:00
Vladislav Vaintroub
c61c1d7ce1 MDEV-4576 : Aria storage engine's temporary files might not be deleted (Errcode : 13)
See also MySQL Bug #39750  and similar ones.

Fix my_delete() on Windows, to safely remvoe files on Windows, including files  that are opened by another threads in the same process, antiviruses and  backup applications. If file to be deleted is  also  opened by another thread, the file is renamed to unique name prior to deletion - this makes it possible to create file with the same name right after deletion.
With this patch my_delete_allow_opened() becomes obsolete and is replaced with my_delete().

This patch is rework of the patch  http://lists.mysql.com/commits/59327  for MySQL bug#39750.
2013-06-16 22:13:26 +02:00
Vladislav Vaintroub
4b058643cd MDEV-4601 : Allow MariaDB to be build without non-blocking client.
Non-blocking client currently can be build on Windows, GCC on i386 and x64, or any OS wth ucontext.h header. Prior to this patch, build failed if neither of these conditions is true.
Fix to avoid compiler errors in these case - non-blocking API would not be useful on , but otherwise everything will work as before.
2013-06-15 14:22:03 +02:00
Sergei Golubchik
2db4392bf4 MDEV-4297 mysql --binary-mode
backport mysql --binary-mode (bug#11747577, bug#33048)
2013-06-10 21:45:30 +02:00
Sergei Golubchik
4749d40c63 5.5 merge 2013-06-06 17:51:28 +02:00
Sergei Golubchik
d7a6c801ac 5.3 merge.
change maria.distinct to use a function that doesn't require ssl-enabled  builds
2013-05-20 12:36:30 +02:00
Sergei Golubchik
639a766096 5.2 merge 2013-05-20 11:13:07 +02:00
Sergei Golubchik
4ee5ae3e7f 5.1 merge 2013-05-20 10:53:04 +02:00
Venkatesh Duggirala
7397aa913d Bug#14236170 MYSQLDUMP 5.5.25 CLIENT FAILS TO DUMP
MYSQL DB FROM REMOTE 5.0.96 SERVER

Problem: mysqldump tool assumes the existence of
general_log and slow_log tables in the server.
If mysqldump tool executes on a old server where
there are no log tables like these, mysqldump tool
fails.

Analysis: general_log and slow_log tables are added
in the ignore-table list as part of bug-26121 fix
causes bug-45740 (MYSQLDUMP DOESN'T DUMP GENERAL_LOG
AND SLOW_QUERY CAUSES RESTORE PROBLEM). As part of
the bug-45740 fix, mysqldump tool adds create table
queries for these two tables. But the fix assumes
that on all the servers, general_log and slow_log
will be there. If the new mysqldump tool is executed
against a old server where there are no general_log
and slow_log, the mysqldump tool fails with an error
that 'there is no general_log table'.

Fix: When mysqldump tool is trying to retrieve general_log
and slow_log table structures, first the tool should
check their existence of these tables in the server
instead of trying to dump it blindly.
2013-05-17 18:54:36 +05:30
Shubhangi Garg
b25d5cff5c Bug#16607258 :Linker Errors Due To Inclusion Of An Implementation File
In log_event.h
      
DESCRIPTION:
Due to inclusion of an implementation file, namely 'rpl_tblmap.cc'
in a header file, namely 'log_event.h'; linker errors occur if
log_event.h is included in an application containing multiple source
files, such as in the case of Binlog API.
      
Binlog API requires including log_event.h in its source files;
which leads to multiple definition errors, for functions defined
in rpl_tblmap.cc for class 'table_mapping'.
            
FIX:
Change the inclusion from header file(log_event.h) to source files
using this header and have flag MYSQL_CLIENT set. The only file in
the current server repository is mysqlbinlog.cc.

client/mysqlbinlog.cc:
  Pulled in code of rpl_tblmap.cc
sql/log_event.h:
  Removed inclusion of the implementation file from this header file
2013-05-14 22:52:42 +05:30
Michael Widenius
4b9a6c03fa Fixed compiler warning 2013-05-11 18:57:06 +03:00
Sergei Golubchik
b381cf843c mysql-5.5.31 merge 2013-05-07 13:05:09 +02:00
Venkatesh Duggirala
2557f2c4ca BUG#16698172-CANNOT DO POINT-IN-TIME RECOVERY FOR
SINGLE DATABASE; MYSQLBINLOG
      
Problem: If last subevent inside a RBR event
is skipped while replaying a binary log
using mysqlbinlog with --database=... option,
generated output is missing end marker('/*!*/;)
for that RBR event. Thence causing syntax error
while replaying the generated output.
      
Fix: Append end marker ('/*!*/;) if the last 
subevent is getting skipped.
Append end marker if the last 
subevent is getting skipped.

client/mysqlbinlog.cc:
  Append end marker if the last 
  subevent is getting skipped.
2013-04-25 11:56:26 +05:30
Sergei Golubchik
07315d3603 strmake_buf(X,Y) helper, equivalent to strmake(X,Y,sizeof(X)-1)
with a bit of lame protection against abuse.
2013-04-17 19:42:34 +02:00
Sergei Golubchik
f57ecb7786 5.5 merge 2013-04-14 10:04:07 +02:00
Venkatesh Duggirala
0fe3128c94 BUG#16615117 MYSQLDUMP PRODUCES A CHANGE MASTER STATEMENT
WITH A PORT NUMBER ENCLOSED IN QUOTES

Problem: mysqldump --dump-slave --include-master-host-port
prints the CHANGE MASTER command in the generated logical
backup. The PORT number that is generated with this command
is a string and should be an integer.

Fix: Remove the Enclosed quotes for port number.
2013-04-12 14:18:21 +05:30
Sergei Golubchik
ce926c90ac 5.3 merge 2013-04-12 01:01:18 +02:00
Sergei Golubchik
ea4a417a8d 5.2 merge 2013-04-11 19:35:39 +02:00
Sergei Golubchik
61ed0ebe73 5.1 merge 2013-04-11 19:30:59 +02:00
Sergei Golubchik
bbbd7cedf5 my_dir() cleanup
* replace pointer acrobatics with a struct
* make sorting explicit: MY_DONT_SORT -> MY_WANT_SORT
(if you want something to be done - say it. fixes all places where
my_dir() was used without thinking)
* typo s/number_off_files/number_of_files/
* directory_file_name() doesn't need to be extern
* remove #ifdef __BORLANDC__
* ignore '.' and '..' entries
2013-04-07 15:19:45 +02:00
Sergei Golubchik
7b55b59b57 MDEV-4244 [PATCH] Buffer overruns and use-after-free errors
fixes for gcc 4.8 - compilation warnings and -fsanitize=address
2013-04-06 21:29:12 +02:00
sayantan dutta
924c2c6f04 Bug #16402124 - MTR PROCESSES CERTAIN ASSIGNED VARDIR VALUES WRONG 2013-03-29 16:33:33 +05:30
Sergei Golubchik
993ea79f2d 5.5 merge 2013-03-27 23:41:02 +01:00
Nirbhay Choubey
2ce82cd442 Bug#16500013 : post-fix 2013-03-22 14:55:30 +05:30
Nirbhay Choubey
f735e50b62 Bug#16500013 : ADD VERSION CHECK TO MYSQL_UPGRADE
(Based on Sinisa's patch)

Added a version checking facility to mysql_upgrade.
The versions used for checking is the version of the
server that mysql_upgrade is going to upgrade and the
server version that mysql_upgrade was build/distributed
with.
Also added an option '--version-check' to enable/disable
the version checking.
2013-03-21 22:51:40 +05:30
Murthy Narkedimilli
8afe262ae5 Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
Sujatha Sivakumar
f52aa927ac merge from mysql-5.1 to mysql-5.5 2013-03-18 15:03:54 +05:30
Sujatha Sivakumar
b95d5cdaa4 Bug#14771299 OUT-OF-BOUND READS WRITE IN MYSQLBINLOG
Problem:
=======
Found using AddressSanitizer testing.

The mysqlbinlog utility may result in out-of-bound heap
buffer reads and thus, undefined behaviour, when processing
RBR events in the old (pre-5.1 GA) format.

The following code in process_event() would only be correct
if Rows_log_event was the base class for
Write,Update,Delete_rows_log_event_old classes:

    case PRE_GA_WRITE_ROWS_EVENT:
    case PRE_GA_DELETE_ROWS_EVENT:
    case PRE_GA_UPDATE_ROWS_EVENT:
...
        Rows_log_event *e= (Rows_log_event*) ev;
        Table_map_log_event *ignored_map=
          print_event_info->m_table_map_ignored.get_table(e->get_table_id());
...
        if (e->get_flags(Rows_log_event::STMT_END_F))
        {
...
        }

However, Rows_log_event is only the base class for the
Write,Update_Delete_rows_event family of classes, but not
for their *_old counterparts. So the above typecasts are
incorrect for the old-format RBR events and may result (and
do result according to AddressSanitizer reports) in reading
memory outside of the previously allocated on heap buffer.

Fix:
===
The above mentioned invalid type cast has been replaced with
appropriate old counterpart.

Note:The above mentioned issue is present only mysql-5.1 and
5.5. This is fixed in mysql-5.6 and above as part of 
Bug#55790. Hence few of the relevant changes of Bug#55790 are
being back ported to fix the current issue.

client/mysqlbinlog.cc:
  The above mentioned invalid type cast of using new event
  object to read old events, has been replaced with
  appropriate old counterpart.
  
  Note:The above mentioned issue is present only mysql-5.1 and
  5.5. This is fixed in mysql-5.6 and above as part of 
  Bug#55790. Hence few of the relevant changes of Bug#55790 are
  being back ported to fix the current issue.
2013-03-18 15:01:16 +05:30
Nirbhay Choubey
6d6af5477e Merge of patch for bug#14685362 from mysql-5.1. 2013-03-18 12:46:06 +05:30
Nirbhay Choubey
a6adbd0533 Bug#14685362 : MEMORY LEAKS IN MYSQL CLIENT IN
INTERACTIVE MODE

In interactive mode, libedit/readline allocates memory
for every new line entered & later the allocated memory
never gets freed.

Fixed by freeing the allocated memory blocks appropriately.
2013-03-18 12:44:38 +05:30
Venkatesh Duggirala
6947da5cf5 BUG#14593883-REPLICATION BREAKS WHEN SET DATA TYPE
COLUMNS ARE USED INSIDE A STORED PROCEDURE 
Merging post-push fix from mysql-5.1
2013-03-13 16:29:11 +05:30
Venkatesh Duggirala
58ad37dcad BUG#14593883-REPLICATION BREAKS WHEN SET DATA TYPE
COLUMNS ARE USED INSIDE A STORED PROCEDURE

Post-push fix.
String::operator=() in client/sql_string.h also 
needs to be updated with fix.
2013-03-13 16:24:35 +05:30
Sergei Golubchik
8161c6772d merge with mysql-5.5.30 minus few incorrect or not applicable changesets 2013-02-28 18:42:49 +01:00
Murthy Narkedimilli
053d7e775c Updated/added copyright headers. 2013-02-25 15:26:00 +01:00
Murthy Narkedimilli
8f73221035 Updated/added copyright headers 2013-02-26 06:35:17 +01:00