Commit graph

151 commits

Author SHA1 Message Date
Alexander Barkov
344ddc85fa Merging mysql-next-mr-merge to mysql-next-mr. 2009-10-21 15:48:22 +05:00
Alexander Barkov
f8a54c72ff Backporting WL#4164 Two-byte collation IDs 2009-10-15 15:17:32 +05:00
V Narayanan
7ad93d9b2c Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20
changing year in copyright header to 2009.
2009-10-12 15:25:59 +05:30
V Narayanan
db4e61acd4 Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20
Fixing copyright header in test collation file.
2009-10-12 15:05:40 +05:30
V Narayanan
3b02f76aaf Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20
In MySQL when the mapping for space is changed to something other than
0x20 by defining a different collation, then space is not ignored when
comparing two strings.

This was happening because the function that performs the comparison
of two strings while ignoring ending spaces, was comparing the collation
value of a space with the ascii value of the ' ' character. This should
be changed to do comparison between the collated values.
2009-10-12 13:13:15 +05:30
Alexander Barkov
741a1df4cc WL#1397 convert XML -> SQL 2009-10-12 11:22:53 +05:00
f4b6aeaf5b Bug #46998 mysqlbinlog can't output BEGIN even if the database is included in a transaction
The 'BEGIN/COMMIT/ROLLBACK' log event could be filtered out if the
database is not selected by --database option of mysqlbinlog command.
This can result in problem if there are some statements in the
transaction are not filtered out.

To fix the problem, mysqlbinlog will output 'BEGIN/ROLLBACK/COMMIT' 
in regardless of the database filtering rules.
2009-09-30 10:31:25 +08:00
869c011218 Bug #46998 mysqlbinlog can't output BEGIN even if the database is included in a transaction
The 'BEGIN/COMMIT/ROLLBACK' log event could be filtered out if the
database is not selected by --database option of mysqlbinlog command.
This can result in problem if there are some statements in the
transaction are not filtered out.

To fix the problem, mysqlbinlog will output 'BEGIN/ROLLBACK/COMMIT' 
in regardless of the database filtering rules.
2009-09-30 10:01:52 +08:00
f5be2159fe BUG#45516 SQL thread does not use database charset properly
Replication SQL thread does not set database default charset to 
thd->variables.collation_database properly, when executing LOAD DATA binlog.
This bug can be repeated by using "LOAD DATA" command in STATEMENT mode.
        
This patch adds code to find the default character set of the current database 
then assign it to thd->db_charset when slave server begins to execute a relay log.
The test of this bug is added into rpl_loaddata_charset.test
2009-08-12 11:54:05 +08:00
Mattias Jonsson
475c64238a merge 2009-08-12 11:46:08 +02:00
dc4b7b8943 Manual Merge 2009-08-12 13:31:56 +08:00
Davi Arnaut
97ff334b37 Bug#43587: Putting event_scheduler=1 in init SQL file crashes
mysqld

The problem was that enabling the event scheduler inside a init
file caused the server to crash upon start-up. The crash occurred
because the event scheduler wasn't being initialized before the
commands in the init-file are processed.

The solution is to initialize the event scheduler before the init
file is read. The patch also disables the event scheduler during
bootstrap and makes the bootstrap operation robust in the
presence of background threads.
2009-07-24 15:45:42 -03: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
Narayanan V
2b491daa1c BUG#37631 - Incorrect key file for table after upgrading from 5.0 to 5.1
This patch adds corrections to the original patch
submitted 2009-04-08 (http://lists.mysql.com/commits/71607):

- fixed that the original patch didn't work because of an
  incorrect condition;
- added a test case.
2009-04-30 18:16:49 +05:30
Sergey Glukhov
99369b1027 fixed archive test. It might be OOM error on boxes with low amount of memory.
It leads to crash because there is no OOM check in ha_archive::unpack_row().
The fix:
added OOM error check
2009-03-26 18:27:34 +04:00
Satya B
bbd694a3b0 Fix for BUG#32880 - Repairing Archive table fails with internal error 144
Any statement reading corrupt archive data file
(CHECK/REPAIR/SELECT/UPDATE/DELETE) may cause assertion
failure in debug builds. This assertion has been removed
and an error is returned instead.

Also fixed that CHECK/REPAIR returns vague error message
when it mets corruption in archive data file. This is
fixed by returning proper error code.
2009-03-18 11:16:21 +05:30
Georgi Kodinov
3aec7ca415 merged 5.1-main -> 5.1-bugteam 2009-01-30 15:44:49 +02:00
Georgi Kodinov
0ef24ca9fe merged bug 42366 to 5.1-bugteam 2009-01-28 17:00:28 +02:00
Georgi Kodinov
7234ca1a44 Bug #42366: server-cert.pem expired: "Not After : Jan 27 08:54:13 2009 GMT"
Re-generated the PKI files needed.
Removed the ones that are not needed.
Updated the tests to reference the correct SSL subject.
2009-01-28 16:18:50 +02:00
Luis Soares
14d4576bfe merge: 5.1 -> 5.1-rpl
conflicts:
  Text conflict in client/mysqltest.cc
  Text conflict in mysql-test/include/wait_until_connected_again.inc
  Text conflict in mysql-test/lib/mtr_report.pm
  Text conflict in mysql-test/mysql-test-run.pl
  Text conflict in mysql-test/r/events_bugs.result
  Text conflict in mysql-test/r/log_state.result
  Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
  Text conflict in mysql-test/r/mysqlcheck.result
  Text conflict in mysql-test/r/query_cache.result
  Text conflict in mysql-test/r/status.result
  Text conflict in mysql-test/suite/binlog/r/binlog_index.result
  Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
  Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
  Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
  Text conflict in mysql-test/t/disabled.def
  Text conflict in mysql-test/t/events_bugs.test
  Text conflict in mysql-test/t/log_state.test
  Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
  Text conflict in mysql-test/t/mysqlcheck.test
  Text conflict in mysql-test/t/query_cache.test
  Text conflict in mysql-test/t/rpl_init_slave_func.test
  Text conflict in mysql-test/t/status.test
2009-01-23 13:22:05 +01:00
Mattias Jonsson
1200228277 Bug#39893: Crash if select on a partitioned table, when partitioning is disabled
Problem was that it tried to run partitioning function calls when
opening a partitioned table, when it was explicitly disabled.

Solution is to check if the partitioning plugin is ready to use before
using any partitioning specific calls.
2009-01-08 15:16:44 +01:00
Sven Sandberg
05d7673340 BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event
Problem: When an Incident_log_event contains a bad incident number on disk,
the server crashes with an assertion.
Fix: Don't validate input with assertions. Use errors.
2008-12-29 17:04:10 +01:00
Alfranio Correia
3175a06a13 merge 5.1 --> 5.1-rpl 2008-12-13 19:42:12 +00:00
Georgi Kodinov
8f8183eee3 merged bug 39920 and 5.1-main to 5.1-bugteam 2008-12-01 17:22:16 +02:00
Georgi Kodinov
8f36a23c00 Bug #39920: MySQL cannot deal with Leap Second expression in string literal.
Updated MySQL time handling code to react correctly on UTC leap second additions.
MySQL functions that return the OS current time, like e.g. CURDATE(), NOW() etc
will return :59:59 instead of :59:60 or 59:61.
As a result the reader will receive :59:59 for 2 or 3 consecutive seconds 
during the leap second.
This fix will not affect the values returned by UNIX_TIMESTAMP() for leap seconds.
But note that when converting the value returned by UNIX_TIMESTAMP() to broken 
down time the correction of leap seconds will still be applied.
Note that this fix will make a difference *only* if the OS is specially configured
to return leap seconds from the OS time calls or when using a MySQL time zone 
defintion that has leap seconds.
Even after this change date/time literals (or other broken down time 
representations) with leap seconds (ending on :59:60 or 59:61) will still be 
considered illegal and discarded by the server with an error or 
a warning depending on the sql mode.
Added a test case to demonstrate the effect of the fix.
2008-12-01 16:18:35 +02:00
He Zhenxing
6e86e05823 Merge 5.1 main -> 5.1-rpl 2008-09-06 08:51:17 +08:00
Mattias Jonsson
63f983aceb Post push fix for valgrind warning in ha_partition.cc
Bug#35161
Fixed memory leak when failing to open a partition.

Bug#20129
Added tests for verifying REPAIR PARTITION.
2008-08-19 11:44:22 +02:00
Mattias Jonsson
da29c528d3 Bug#35161: --myisam-recover does not work for partitioned MyISAM tables
Problem was that auto_repair, is_crashed and check_and_repair was not
implemented in ha_partition.

Solution, implemented them as loop over all partitions for is_crashed and
check_and_repair, and using the first partition for auto_repair.

(Recommit after fixing review comments)
2008-07-07 17:54:42 +02:00
Sven Sandberg
eb05cd9e4f BUG#37858: loaddata,rpl_slave_skip,rpl_innodb_mixed_dml fail if datafile not world-readable
Problem 1: main.loaddata tried to trigger an error caused by
reading files outside the vardir, by reading itself. However,
if loaddata.test is not world-readable (e.g., umask=0077),
then another error is triggered.
Fix 1: allow the other error too.
Problem 2: rpl_slave_skip and rpl_innodb_mixed_dml tried to
copy a file from mysql-test/suite/rpl/data to mysql-test/var
and then read it. That failed too if umask=0077, since the
file would not become world-readable.
Fix 2: move the files from mysql-test/suite/rpl/data to
mysql-test/std_data and update tests accordingly. Remove
the directory mysql-test/suite/rpl/data.
2008-07-04 11:33:34 +02:00
Magnus Svensson
3d34d34c88 Merge 5.1->5.1-rpl
Fix paths and name of a few files to make it work with new mtr.pl
2008-05-30 11:12:07 +02:00
gshchepa/uchum@host.loc
fc93a32ec9 Merge host.loc:/work/bugs/5.0-bugteam-36055
into  host.loc:/work/bk/5.1-bugteam
2008-05-13 00:37:45 +05:00
gshchepa/uchum@host.loc
486ef1bad6 Merge host.loc:/work/bugs/5.0-bugteam-36055
into  host.loc:/work/bk/5.0-bugteam
2008-05-13 00:32:43 +05:00
gshchepa/uchum@host.loc
1e7be565e2 Fixed bug #36055: mysql_upgrade doesn't really 'upgrade' tables
The REPAIR TABLE ... USE_FRM query silently corrupts data of tables
with old .FRM file version.
The mysql_upgrade client program or the REPAIR TABLE query (without
the USE_FRM clause) can't prevent this trouble, because in the
common case they don't upgrade .FRM file to compatible structure.

1. Evaluation of the REPAIR TABLE ... USE_FRM query has been
   modified to reject such tables with the message:
   "Failed repairing incompatible .FRM file".

2. REPAIR TABLE query (without USE_FRM clause) evaluation has been
   modified to upgrade .FRM files to current version.

3. CHECK TABLE ... FOR UPGRADE query evaluation has been modified
   to return error status when .FRM file has incompatible version.

4. mysql_upgrade and mysqlcheck client programs call CHECK TABLE
   FOR UPGRADE and REPAIR TABLE queries, so their behaviors have
   been changed too to upgrade .FRM files with incompatible
   version numbers.
2008-05-12 21:01:13 +05:00
hhunger@hh-nb.hungers
88451eacfd Merge hh-nb.hungers:/work/trees/mysql-5.1-build-src-clean
into  hh-nb.hungers:/work/merge/mysql-5.1-build
2008-04-10 18:32:37 +02:00
hhunger@hh-nb.hungers
afd90d6166 System variable tests delivered by Folio3 (see WL4288). 2008-04-10 15:14:28 +02:00
msvensson@pilot.mysql.com
a011d27cf9 Merge pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-rpl
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-mtr
2008-04-03 11:50:43 +02:00
mleich@five.local.lan
4f4d10da03 Merge mleich@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  five.local.lan:/work/trees/mysql-5.0-build-src-clean
2008-04-02 14:55:35 +02:00
mleich@five.local.lan
a36a3fa266 Merge mleich@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  five.local.lan:/work/trees/mysql-5.1-build-src-clean
2008-04-02 14:50:29 +02:00
mleich@five.local.lan
414299f4de Post merge fix for
ChangeSet@1.2583, 2008-03-31
   Merge five.local.lan:/work/merge/mysql-5.0-Bug
   into  five.local.lan:/work/merge/mysql-5.1-Bug
   Addditional manual fixes will be needed.
   MERGE: 1.1810.3667.16

   Which contains
      ChangeSet@1.1810.3667.16, 2008-03-31
      Fix for Bug
        #35335 funcs_1: Some tests fail within load_file during
                        pushbuild runs
   ...
2008-04-01 13:18:31 +02:00
mleich@five.local.lan
6a835464e4 Merge five.local.lan:/work/merge/mysql-5.0-Bug
into  five.local.lan:/work/merge/mysql-5.1-Bug
Addditional manual fixes will be needed.
2008-03-31 23:39:51 +02:00
mleich@five.local.lan
89ddc0aa52 Fix for
Bug#35335 funcs_1: Some tests fail within load_file during
                      pushbuild runs
   Solution: 1. Move files with input data used in load_file, 
                load data etc. 
                from suite/funcs_1/<whatever>
                to std_data
             2. Use for testsuite funcs_1 the server option
                --secure-file-priv=<MYSQLTEST_VARDIR>
             3. Outfiles have to be stored under MYSQLTEST_VARDIR 
+ changes according to WL#4304 Cleanup in funcs_1 tests
  - backport of fixes/improvements made in 5.1 to 5.0
    The differences between scripts in 5.0 and 5.1 cause
    much additional and annoying work during any upmerge.
  - replace error numbers with names
  - improved comments
  - improved formatting
  - Unify storage engine names so that result files for
    storage engine variants do not differ (some tests)
  - remove a script no more used (tests are done in other scripts)
2008-03-31 19:48:02 +02:00
gkodinov/kgeorge@magare.gmz
0463ba57a5 Merge bk-internal:/home/bk/mysql-5.1
into  magare.gmz:/home/kgeorge/mysql/work/merge-build-5.1-bugteam
2008-03-31 11:57:18 +03:00
anozdrin/alik@quad.opbmk
f5c4b91cf7 Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-bt
into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1-bt-merged
2008-03-28 23:54:14 +03:00
anozdrin/alik@quad.opbmk
814e2613b0 Fix tree:
1. Use 'dat' extension, because it is handled in Makefile.am;
  2. Fix typo: the bug id is 35469, not 35649.
2008-03-28 23:39:47 +03:00
anozdrin/alik@quad.opbmk
2880d2081e Fix for Bug#35469: server crash with LOAD DATA INFILE to a VIEW.
The problem was that LOAD DATA code (sql_load.cc) didn't take into
account that there may be items, representing references to other
columns. This is a usual case in views. The crash happened because
Item_direct_view_ref was casted to Item_user_var_as_out_param,
which is not a base class.

The fix is to
  1) Handle references properly;
  2) Ensure that an item is treated as a user variable only when
     it is a user variable indeed;
  3) Report an error if LOAD DATA is used to load data into
     non-updatable column.
2008-03-28 18:59:13 +03:00
hezx@mail.hezx.com
a3d02647e6 BUG#33029 5.0 to 5.1 replication fails on dup key when inserting
using a trig in SP

For all 5.0 and up to 5.1.12 exclusive, when a stored routine or
trigger caused an INSERT into an AUTO_INCREMENT column, the
generated AUTO_INCREMENT value should not be written into the
binary log, which means if a statement does not generate
AUTO_INCREMENT value itself, there will be no Intvar event (SET
INSERT_ID) associated with it even if one of the stored routine
or trigger caused generation of such a value. And meanwhile, when
executing a stored routine or trigger, it would ignore the
INSERT_ID value even if there is a INSERT_ID value available set
by a SET INSERT_ID statement.

Starting from MySQL 5.1.12, the generated AUTO_INCREMENT value is
written into the binary log, and the value will be used if
available when executing the stored routine or trigger.

Prior fix of this bug in MySQL 5.0 and prior MySQL 5.1.12
(referenced as the buggy versions in the text below), when a
statement that generates AUTO_INCREMENT value by the top
statement was executed in the body of a SP, all statements in the
SP after this statement would be treated as if they had generated
AUTO_INCREMENT by the top statement.  When a statement that did
not generate AUTO_INCREMENT value by the top statement but by a
function/trigger called by it, an erroneous Intvar event would be
associated with the statement, this erroneous INSERT_ID value
wouldn't cause problem when replicating between masters and
slaves of 5.0.x or prior 5.1.12, because the erroneous INSERT_ID
value was not used when executing functions/triggers. But when
replicating from buggy versions to 5.1.12 or newer, which will
use the INSERT_ID value in functions/triggers, the erroneous
value will be used, which would cause duplicate entry error and
cause the slave to stop.

The patch for 5.1 fixed it to ignore the SET INSERT_ID value when
executing functions/triggers if it is replicating from a master
of buggy versions, another patch for 5.0 fixed it not to generate
the erroneous Intvar event.
2008-03-14 11:35:41 +08:00
msvensson@pilot.mysql.com
56a354794c Merge pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-rpl
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-mtr
2008-02-28 12:21:44 +01:00
mkindahl@dl145h.mysql.com
3bcab5899d Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
2008-01-30 12:14:14 +01:00
aelkin/elkin@koti.dsl.inet.fi
c5b597bc89 bug#30435
changes due to non-determinism in value of read_buffer_size.
2007-12-23 11:18:46 +02:00
msvensson@pilot.mysql.com
d918988baa WL#4189
- dynamic configuration support
 - safe process
 - cleanups
 - create new suite for fedarated
2007-12-12 18:19:24 +01:00