Commit graph

59922 commits

Author SHA1 Message Date
Alexander Nozdrin
9151c5e41a Null-merge from mysql-trunk. 2010-02-14 13:24:21 +03:00
Alexander Nozdrin
43727b5b1c Fix tree name. 2010-02-14 13:22:03 +03:00
joerg.bruehe@sun.com
f68fbf2c24 Raise version number after cloning 5.5.2-m2 2010-02-12 20:17:53 +01:00
Joerg Bruehe
22008fb5e5 Automerge from central "trunk-bugfixing". 2010-02-12 17:41:00 +01:00
Joerg Bruehe
4ecf25d39e Upmerge the RPM spec file correction: "release" was missing. 2010-02-12 17:26:22 +01:00
Joerg Bruehe
a02157aea2 Correction: The "release" setting had got lost in the RPM spec file. 2010-02-12 17:23:22 +01:00
Joerg Bruehe
61ae95ed6b Upmerge the spec file alignment from 5.1 to 5.5,
no other functional changes.
2010-02-12 13:20:42 +01:00
Evgeny Potemkin
b5f40f3454 Bug#50539: Wrong result when loose index scan is used for an aggregate
function with distinct.
Loose index scan is used to find MIN/MAX values using appropriate index and
thus allow to avoid grouping. For each found row it updates non-aggregated
fields with values from row with found MIN/MAX value.
Without loose index scan non-aggregated fields are copied by end_send_group
function. With loose index scan there is no need in end_send_group and
end_send is used instead. Non-aggregated fields still need to be copied and
this was wrongly implemented in QUICK_GROUP_MIN_MAX_SELECT::get_next.
WL#3220 added a case when loose index scan can be used with end_send_group to
optimize calculation of aggregate functions with distinct. In this case
the row found by QUICK_GROUP_MIN_MAX_SELECT::get_next might belong to a next
group and copying it will produce wrong result.

Update of non-aggregated fields is moved to the end_send function from
QUICK_GROUP_MIN_MAX_SELECT::get_next.
2010-02-12 11:51:52 +03:00
6bad45745c Bug #43913 rpl_cross_version can't pass on conflicts complainig clash with
--slave-load-tm
      
The MDL_SHARED lock was introduced for an object in 5.4, but the 'TABLE_LIST' 
object was not initialized with the MDL_SHARED lock when applying event with 
LOAD DATA INFILE into table. So the failure is caused when checking the 
MDL_SHARED lock for the object.
To fix the problem, the 'TABLE_LIST' object was initialized with the MDL_SHARED 
lock when applying event with LOAD DATA INFILE into table.
2010-02-12 12:04:57 +08:00
Joerg Bruehe
16e60ff563 Upmerge changes done to the generic spec file in 5.0 to 5.1,
this includes a major whitespace (formatting) alignment
and sequence changes to better agree with other spec files.

Further changes:
- All features are controlled by "%define" set from call
  options or builtin.
- "bundled zlib" is on by default.
- "with libgcc" is controlled by runtime detection of gcc.
- Handling of "CFLAGS" and "CXXFLAGS" is more concentrated.
- Several missing man pages were added.
2010-02-11 21:33:48 +01:00
Magne Mahre
5f2c8caea9 Bug#50574 5.5.x allows spatial indexes on non-spatial columns,
causing crashes!

Adding a SPATIAL INDEX on a non-geometrical column caused a
segmentation fault when the table was subsequently 
inserted into.
      
A test was added in mysql_prepare_create_table to explicitly
check whether non-geometrical columns are used in a
spatial index, and throw an error if so.
2010-02-11 18:25:34 +01:00
Magne Mahre
b2ddac5563 Bug#50542 5.5.x doesn't check length of key prefixes:
corruption and crash results
      
An index creation statement where the index key
is larger/wider than the column it references 
should throw an error.
      
A statement like:
  CREATE TABLE t1 (a CHAR(1), PRIMARY KEY (A(255)))
did not error, but a segmentation fault followed when
an insertion was attempted on the table
      
The partial key validiation clause has been 
restructured to (hopefully) better document which
uses of partial keys are valid.
2010-02-11 18:02:41 +01:00
Luis Soares
21e68e4f1d BUG#50984: check_testcase fails for rpl_tmp_table_and_DDL
We found that there are some tests that are not cleaning
up properly:
      
  1. rpl_tmp_table_and_DDL
  2. rpl_do_grant
  3. rpl_sync
      
For #1 and #2 we found that the slave would not, for some
cases, replicate all the instructions the master processed 
in the cleanup section. We fix these by deploying some 
synchronization commands in the test cases so that slave 
processes all clean up instructions.
      
As for #3, this is tracked as part of another bug 
(BUG@50442).
2010-02-10 12:12:55 +00:00
Mattias Jonsson
84c205f9ee Bug#50201: Server crashes in explain_filename on an InnoDB partitioned table
Problem was that in mysql-trunk the ER() macro is now dependent on current_thd
and the innodb monitor thread has no binding to that thd object. This cause 
the crash because of bad derefencing.

Solution was to add a new macro which take the thd as an argument (which the innodb
thread uses for the call).

(Updated according to reviewers comments, i.e. added ER_THD_OR_DEFAULT and
moved test to suite parts.)
2010-02-10 10:47:14 +01:00
Alexander Nozdrin
b4c213c80e Auto-merge from mysql-trunk. 2010-02-09 14:04:56 +03:00
Alexander Nozdrin
0d9f6bccd3 Fix ndb_dd_ddl.test: drop created database after use. 2010-02-09 13:10:36 +03:00
Joerg Bruehe
fc5e9a4a54 Upmerge "configure.in" text change from 5.1 to 5.5 ("trunk"),
fixing bug#50950.
2010-02-08 22:16:07 +01:00
Joerg Bruehe
f6df1770fc Upmerge "configure.in" text change from 5.0 to 5.1,
fixing bug#50950.
2010-02-08 21:40:17 +01:00
Joerg Bruehe
15728d0721 Bug#50950 Obsolete reference to www.mysql.com
in message printed at end of configure

New text for the success message of "configure".
2010-02-08 21:10:37 +01:00
Alexander Nozdrin
2d9ce608cd Auto-merge from mysql-trunk. 2010-02-05 18:43:22 +03:00
Alexander Nozdrin
a93d838a12 Cherry-pick merge from mysql-5.1-bugteam.
Original revision:
------------------------------------------------------------
revision-id: kent.boortz@sun.com-20100204182709-dw1dwpglkd5qrehb
committer: Kent Boortz <kent.boortz@sun.com>
branch nick: mysql-5.1-bugteam
timestamp: Thu 2010-02-04 19:27:09 +0100
message:
  LT_INIT and LT_PREREQ was added in libtool 2.2 2008, a bit too
  recent, switched back to the older AC_PROG_LIBTOOL
------------------------------------------------------------
2010-02-05 18:31:06 +03:00
Alexander Nozdrin
950e907bf7 Manual merge (empty) from mysql-5.1. 2010-02-05 18:14:01 +03:00
Alexander Nozdrin
94c1dc58ad Auto-merge from mysql-trunk. 2010-02-05 15:02:03 +03:00
hery.ramilison@sun.com
1c9ab8d6ee Raise version number after cloning 5.1.44 2010-02-04 12:23:33 +01:00
Georgi Kodinov
3e699a7972 merge 2010-02-04 12:14:44 +02:00
Georgi Kodinov
21dbe024cd tree name change 2010-02-04 12:13:29 +02:00
He Zhenxing
c0b41c8954 Auto merge 2010-02-04 12:47:42 +08:00
He Zhenxing
409ef39146 Auto merge from 5.1-rep-semisync 2010-02-04 12:37:56 +08:00
He Zhenxing
b7289d6dc5 Bug#49894 shifted MYSQL_REPLICATION_PLUGIN number
The number for MYSQL_REPLICATION_PLUGIN was shifted when backporting
because MYSQL_AUDIT_PLUGIN was not backported.

This problem is fixed by backporting only the number of audit plugin
and print an error when trying to load audit plugins. Note that
replication plugins compiled against old MYSQL_REPLICATION_PLUGIN
number will also be recognized as audit plugin and be rejected.
2010-02-04 12:14:32 +08:00
Alexander Nozdrin
4c8fd3cf57 Manual merge from mysql-5.1-bugteam.
Conflicts:
  - configure.in
  - mysql-test/include/setup_fake_relay_log.inc
  - sql/sql_select.cc
2010-02-03 20:22:58 +03:00
Luis Soares
d0ffa8e51b BUG#50364: FLUSH LOGS crashes the server (rpl.rpl_heartbeat_basic
fails in PB sporadically)
      
The IO thread can concurrently access the relay log IO_CACHE
while another thread is performing an FLUSH LOGS procedure.
      
FLUSH LOGS closes and reopens the relay log and while doing so it
(re)initializes its IO_CACHE. During this procedure the IO_CACHE
mutex is also reinitialized, which can cause problems if some
other thread (namely the IO THREAD) is concurrently accessing it
at the time .
      
This patch fixes the problem by extending the interface of the
flush_master_info function to also include a second paramater, 
"need_relay_log_lock", stating whether the thread should grab the 
relay log lock or not before actually flushing the relay log. 
Also, IO thread now calls flush_master_info with this flag set 
when it flushes master info with in the event read_event loop.

Finally, we also increase loop time in rpl_heartbeat_basic test 
case, so that the number of calls to flush logs doubles, stressing
this part of the code a little more.
2010-02-03 16:56:17 +00:00
Alexander Nozdrin
f62f1a528b Manual merge from mysql-5.1-bugteam.
Conflicts:
  - sql/mysqld.cc
2010-02-03 19:28:40 +03:00
Georgi Kodinov
ea992477af merge 2010-02-03 17:27:55 +02:00
Georgi Kodinov
38f8869703 merge 2010-02-03 17:25:29 +02:00
Georgi Kodinov
4600c79d34 merge 2010-02-03 17:05:06 +02:00
Alexander Nozdrin
31ba3bf5cb Manual merge from mysql-5.1-bugteam.
Conflicts:
  - mysql-test/collections/default.experimental
  - mysql-test/suite/rpl/r/rpl_sp.result
2010-02-03 17:01:48 +03:00
Kent Boortz
21a6569952 Adjuster the parsing of "configure.in" version number line 2010-02-03 14:52:11 +01:00
Luis Soares
90f7cfa6ac automerge mysql-5.1-bugteam bug clone --> mysql-5.1-bugteam latest. 2010-02-03 12:12:51 +00:00
Kent Boortz
480663e431 Changes to be able to create source TAR packages with longer
path names than 99 characters, using the USTAR format of the
resulting source TAR.

To be able to specify the use of USTAR when creating the source
TAR, we needed both to update the GNU autotools version requirements
slightly, and update the initiation of the tools to use more
modern constructs.
2010-02-02 23:29:14 +01:00
Joerg Bruehe
c41646d2a5 Cleanup in the RPM spec file:
Get rid of trailing blanks.
2010-02-02 17:53:52 +01:00
Magne Mahre
632cf4c502 Cleanup fix for WL#5154 that splits commands handling for
--default-character-set and --character-set-server such
that only the first will give a deprecation warning.
Apart from that, the two options should do the same.
2010-02-02 16:34:32 +01:00
Joerg Bruehe
26656115af Spec file for "generic" RPMs:
Cleanup, formatting improvements,
vendor is Sun (since MySQL AB was bought).

Backport the change so that RPM doesn't magically
create a dependency on "Perl-DBI".
2010-02-02 16:28:59 +01:00
Luis Soares
d8bd11e5b1 BUG#47639: The rpl_binlog_corruption test fails on Windows
The test case rpl_binlog_corruption fails on windows because when
adding a line to the binary log index file it gets terminated
with a CR+LF (which btw, is the normal case in windows, but not on
Unixes - LF). This causes mismatch between the relay log names,
causing mysqld to report that it cannot find the log file.

We fix this by creating the instrumented index file through
mysql, ie, using SELECT ... INTO DUMPFILE ..., as opposed on
relying on ultimatly OS commands like: -- echo "..." >
index. These changes go into the file and make the procedure
platform independent:

  include/setup_fake_relay_log.inc

Side note: when using SELECT ... INTO DUMPFILE ..., one needs to
check if mysqld is running with secure_file_priv. If it is, we do
it in two steps: 1. create the file on the allowed location;
2. move it to the datadir. If it is not, then we just create the
file directly on the datadir (so previous step 2. is not needed).
2010-02-02 15:16:47 +00:00
Alexander Nozdrin
f392eddabc Revert a patch for Bug#48231, which introduced valgrind warnings.
Original revision:
------------------------------------------------------------
revision-id: li-bing.song@sun.com-20100130124925-o6sfex42b6noyc6x
parent: joro@sun.com-20100129145427-0n79l9hnk0q43ajk
committer: <Li-Bing.Song@sun.com>
branch nick: mysql-5.1-bugteam
timestamp: Sat 2010-01-30 20:49:25 +0800
message:
  Bug #48321  CURRENT_USER() incorrectly replicated for DROP/RENAME USER;
              REVOKE/GRANT; ALTER EVENT.
  
  The following statements support the CURRENT_USER() where a user is needed.
    DROP USER 
    RENAME USER CURRENT_USER() ...
    GRANT ... TO CURRENT_USER()
    REVOKE ... FROM CURRENT_USER()
    ALTER DEFINER = CURRENT_USER() EVENT
  but, When these statements are binlogged, CURRENT_USER() just is binlogged
  as 'CURRENT_USER()', it is not expanded to the real user name. When slave 
  executes the log event, 'CURRENT_USER()' is expand to the user of slave 
  SQL thread, but SQL thread's user name always NULL. This breaks the replication.
  
  After this patch, All above statements are rewritten when they are binlogged.
  The CURRENT_USER() is expanded to the real user's name and host.
------------------------------------------------------------
2010-02-02 16:38:44 +03:00
Davi Arnaut
1a6ab2267f Fix for valgrind warning: check whether pointer was initialized. 2010-02-02 11:17:58 -02:00
Georgi Kodinov
be89d30f36 fixed various pb2 test failures on windows. 2010-02-02 14:17:21 +02:00
Georgi Kodinov
9544f9d1e3 Made outfile_testdata experimental in 5.1-bugteam, pending the
resulution of bug #46895.
2010-02-01 14:05:21 +02:00
Georgi Kodinov
15ccc8f609 merge 2010-02-01 13:50:30 +02:00
Georgi Kodinov
7d9209680b fixed a typo in bug #49897. 2010-02-01 13:40:16 +02:00
Alexander Nozdrin
adcda7df2b Mark some tests experimental. 2010-01-31 14:38:55 +03:00