1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

This patch fixes LP#613408 Memory corruption with (M)aria storage engine and virtual columns in MariaDB 5.2

Fixed compiler warnings
Disabled some tests that doesn't work on windows (uses shell tools or strange characters)



client/mysqlshow.c:
  Fixed compiler warnings
client/mysqlslap.c:
  Fixed compiler warnings
mysql-test/mysql-test-run.pl:
  Use an error file instead of /dev/null
  (Fixes problem on Windows and the output may be usefull)
mysql-test/suite/maria/r/maria.result:
  Test case for bug LP#613408 (not complete)
mysql-test/suite/maria/t/maria.test:
  Test case for bug LP#613408 (not complete)
mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.test:
  This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_log_slow_slave_statements.test:
  This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-control_global_slow.test:
  This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.test:
  This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.test:
  This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-long_query_time.test:
  This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.test:
  This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.test:
  This test doesn't work one windows (needs shell tools)
mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.test:
  This test doesn't work one windows (needs shell tools)
mysql-test/t/ctype_filesystem.test:
  This test doesn't work one windows (problem with character sets)
mysql-test/t/events_time_zone.test:
  Use longer times to get predictable tests
mysql-test/t/show_check-master.opt:
  set long query time to get more predictable tests
storage/maria/ma_check.c:
  Restore info->s->lock_key_trees after repair.
  Disable logging to temp tables for all repair cases (safety fix)
storage/maria/ma_state.c:
  Ensurethat info->state_start doesn't point to freed memory. (Could happen after running an internal repair to fast create indexes)
storage/maria/trnman.c:
  Added longer comment
This commit is contained in:
Michael Widenius
2010-08-07 17:42:30 +03:00
parent 2e80f1bb09
commit 0d3039d49d
20 changed files with 101 additions and 14 deletions

View File

@@ -4540,7 +4540,7 @@ sub mysqld_stop {
name => "mysqladmin shutdown ".$mysqld->name(),
path => $exe_mysqladmin,
args => \$args,
error => "/dev/null",
error => "$opt_vardir/log/mysqladmin.err",
);
}

View File

@@ -2613,3 +2613,14 @@ INSERT t1 ( f1 , f2 , f3 , f4 ) VALUES ( 0 , f2 , 8 , f3 ) ;
INSERT t1 ( f4 , f2 ) VALUES ( 4 , 92 ) ;
DELETE FROM t1 WHERE v3 = 173 OR v4 = 9 ;
drop table t1;
CREATE TABLE t1 (
f1 CHAR(255) BINARY ,
f2 CHAR(255) BINARY NOT NULL DEFAULT '0',
f3 CHAR(255) BINARY NOT NULL ,
f4 CHAR(255) BINARY NOT NULL DEFAULT '0' ,
v3 CHAR(255) BINARY NOT NULL DEFAULT '0' ,
KEY (v3)
) ENGINE=Maria;
INSERT INTO t1 ( f1 , f2 , f3 , f4 ) SELECT f1 , f4 , f1 , f4 FROM t1;
DELETE FROM t1;
drop table t1;

View File

@@ -1893,6 +1893,23 @@ INSERT t1 ( f4 , f2 ) VALUES ( 4 , 92 ) ;
DELETE FROM t1 WHERE v3 = 173 OR v4 = 9 ;
drop table t1;
#
# Test for LP#61465 Memory corruption with (M)aria storage engine and
# virtual columns
#
CREATE TABLE t1 (
f1 CHAR(255) BINARY ,
f2 CHAR(255) BINARY NOT NULL DEFAULT '0',
f3 CHAR(255) BINARY NOT NULL ,
f4 CHAR(255) BINARY NOT NULL DEFAULT '0' ,
v3 CHAR(255) BINARY NOT NULL DEFAULT '0' ,
KEY (v3)
) ENGINE=Maria;
INSERT INTO t1 ( f1 , f2 , f3 , f4 ) SELECT f1 , f4 , f1 , f4 FROM t1;
DELETE FROM t1;
drop table t1;
#
# End of test
#

View File

@@ -1,3 +1,5 @@
-- source include/not_windows.inc
-- echo # Activate master-slave replication
-- source include/master-slave.inc

View File

@@ -1,3 +1,5 @@
-- source include/not_windows.inc
-- echo # Activate master-slave replication
-- source include/master-slave.inc

View File

@@ -1,3 +1,5 @@
--source include/not_windows.inc
source include/have_innodb.inc;
SELECT sleep(2);
set global log_slow_verbosity=innodb;

View File

@@ -1,3 +1,5 @@
-- source include/not_windows.inc
source include/have_innodb.inc;
SET GLOBAL SLOW_QUERY_LOG=OFF;

View File

@@ -1,3 +1,5 @@
-- source include/not_windows.inc
source include/have_innodb.inc;
SELECT sleep(2);

View File

@@ -1,3 +1,4 @@
source include/not_windows.inc;
source include/have_innodb.inc;
SELECT sleep(1);

View File

@@ -1,3 +1,4 @@
source include/not_windows.inc;
source include/have_innodb.inc;
SELECT sleep(2);

View File

@@ -1,3 +1,4 @@
source include/not_windows.inc;
source include/have_innodb.inc;
SET GLOBAL SLOW_QUERY_LOG=OFF;

View File

@@ -1,3 +1,4 @@
source include/not_windows.inc;
source include/have_innodb.inc;
SELECT sleep(1);

View File

@@ -1,3 +1,5 @@
--source include/not_windows.inc
SET CHARACTER SET utf8;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
SHOW VARIABLES like 'character_sets_dir';

View File

@@ -5,7 +5,7 @@
# to wait for operation to complete. Should be positive. Test runs
# about 25*N seconds (it sleeps most of the time, so CPU speed is not
# relevant).
let $N = 5;
let $N = 6;
#
# 2. Some subtests
# - create a new time zone

View File

@@ -1 +1 @@
--log-output=file --slow-query-log --log-long-format --log-queries-not-using-indexes --myisam-recover="" --general-log --general-log-file="foo" --slow-query-log-file=""
--log-output=file --slow-query-log --log-long-format --log-queries-not-using-indexes --myisam-recover="" --general-log --general-log-file="foo" --slow-query-log-file="" --long_query_time=20