Commit 389dcccb authored by unknown's avatar unknown

- Clean up function for my_uuid()

- Merge fixes
- "make test" for maria
- Replaced ma_test_all with a perl version,
  which now can be run in unittest mode.


include/my_sys.h:
  Added clean up function for my_uuid()
mysql-test/r/create.result:
  Fixed result file.
mysql-test/r/maria-big.result:
  Changed not to get a warning.
mysql-test/r/maria-connect.result:
  Not to get a warning.
mysql-test/r/maria-recovery.result:
  Not to get a warning.
mysql-test/r/maria.result:
  Fixed result file. Added test for warning on log file.
mysql-test/r/ps_maria.result:
  Fixed result file. New bit was added to source.
mysql-test/t/maria-big.test:
  To avoid a warning.
mysql-test/t/maria-connect.test:
  To avoid a warning.
mysql-test/t/maria-recovery.test:
  To avoid a warning.
mysql-test/t/maria.test:
  To avoid a warning.
mysql-test/t/ps_maria.test:
  To avoid a warning.
mysys/my_uuid.c:
  Added clean up function for my_uuid()
sql/mysqld.cc:
  Manual merge.
storage/maria/Makefile.am:
  Added "make test" for maria.
storage/maria/ma_key_recover.c:
  Fix for maria_recovery
storage/maria/ma_test_all.sh:
  Deprecated file. Functionality moved to
  unittest/ma_test_all-t
BitKeeper/deleted/.del-unit.pl:
  BitKeeper file /home/my/mysql-maria/storage/maria/unit.pl
parent 765caec2
......@@ -927,6 +927,7 @@ int my_msync(int, void *, size_t, int);
#define MY_UUID_SIZE 16
void my_uuid_init(ulong seed1, ulong seed2);
void my_uuid(uchar *guid);
void my_uuid_end();
struct my_rnd_struct {
unsigned long seed1,seed2,max_value;
......
......@@ -1717,7 +1717,7 @@ t1 CREATE TABLE `t1` (
`TIME` bigint(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
) ENGINE=MyISAM DEFAULT CHARSET=utf8
) ENGINE=MARIA DEFAULT CHARSET=utf8
drop table t1;
create temporary table t1 like information_schema.processlist;
show create table t1;
......@@ -1731,7 +1731,7 @@ t1 CREATE TEMPORARY TABLE `t1` (
`TIME` bigint(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
) ENGINE=MyISAM DEFAULT CHARSET=utf8
) ENGINE=MARIA DEFAULT CHARSET=utf8
drop table t1;
create table t1 like information_schema.character_sets;
show create table t1;
......
set storage_engine=maria;
affected rows: 0
set global maria_log_file_size=4294967296;
set global maria_log_file_size=4294967295;
affected rows: 0
drop table if exists t1, t2;
affected rows: 0
......
set global storage_engine=maria;
set session storage_engine=maria;
set global maria_log_file_size=4294967296;
set global maria_log_file_size=4294967295;
drop table if exists t1;
SET SQL_WARNINGS=1;
RESET MASTER;
......
set global maria_log_file_size=4294967296;
set global maria_log_file_size=4294967295;
drop database if exists mysqltest;
create database mysqltest;
use mysqltest;
......
set global storage_engine=maria;
set session storage_engine=maria;
set global maria_log_file_size=4294967296;
set global maria_log_file_size=4294967295;
drop table if exists t1,t2;
SET SQL_WARNINGS=1;
CREATE TABLE t1 (
......@@ -1865,7 +1865,7 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (a int) row_format=dynamic transactional=1;
Warnings:
Note 1477 Row format set to PAGE because of TRANSACTIONAL=1 option
Note 1478 Row format set to PAGE because of TRANSACTIONAL=1 option
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
......@@ -1879,7 +1879,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MARIA DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE TRANSACTIONAL=1
alter table t1 row_format=DYNAMIC;
Warnings:
Note 1477 Row format set to PAGE because of TRANSACTIONAL=1 option
Note 1478 Row format set to PAGE because of TRANSACTIONAL=1 option
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
......@@ -2076,3 +2076,6 @@ create table t1 ( fid int not null auto_increment primary key,
g geometry not null, spatial key(g));
ERROR HY000: Maria can't yet handle SPATIAL or FULLTEXT keys in transactional mode. For now use TRANSACTIONAL=0
drop table if exists t1;
set global maria_log_file_size=4294967296;
Warnings:
Warning 1292 Truncated incorrect log_file_size value: '4294967296'
set global maria_log_file_size=4294967296;
set global maria_log_file_size=4294967295;
use test;
drop table if exists t1, t9 ;
create table t1
......@@ -64,7 +64,7 @@ def test t9 t9 c11 c11 246 9 6 Y 0 4 63
def test t9 t9 c12 c12 246 10 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N 1249 0 63
def test t9 t9 c15 c15 7 19 19 N 9441 0 63
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
......@@ -784,20 +784,20 @@ a b
2 two
3 three
4 four
prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
(SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
(SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
(SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
(SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
deallocate prepare stmt1 ;
prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
(SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
(SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
execute stmt1 ;
ccc
1
......@@ -2974,11 +2974,13 @@ Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
......@@ -3012,7 +3014,6 @@ Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
Warnings:
Note 1265 Data truncated for column 'c13' at row 1
Warning 1265 Data truncated for column 'c15' at row 1
Warning 1264 Out of range value for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
......
......@@ -2,7 +2,7 @@
-- source include/have_maria.inc
enable_info;
set storage_engine=maria;
set global maria_log_file_size=4294967296;
set global maria_log_file_size=4294967295;
disable_warnings;
drop table if exists t1, t2;
enable_warnings;
......
......@@ -9,7 +9,7 @@ let $default=`select @@global.storage_engine`;
set global storage_engine=maria;
set session storage_engine=maria;
set global maria_log_file_size=4294967296;
set global maria_log_file_size=4294967295;
# Initialise
--disable_warnings
......
......@@ -5,7 +5,7 @@
--source include/have_debug.inc
--source include/have_maria.inc
set global maria_log_file_size=4294967296;
set global maria_log_file_size=4294967295;
--disable_warnings
drop database if exists mysqltest;
......
......@@ -9,7 +9,7 @@ let $default=`select @@global.storage_engine`;
set global storage_engine=maria;
set session storage_engine=maria;
set global maria_log_file_size=4294967296;
set global maria_log_file_size=4294967295;
# Initialise
--disable_warnings
......@@ -1318,6 +1318,13 @@ create table t1 ( fid int not null auto_increment primary key,
g geometry not null, spatial key(g));
drop table if exists t1;
#
# Test warning on log file size truncates
#
--enable_warnings
set global maria_log_file_size=4294967296;
# End of 5.2 tests
--disable_result_log
......
......@@ -9,7 +9,7 @@
# BEFORE ADDING NEW TEST CASES HERE !!!
-- source include/have_maria.inc
set global maria_log_file_size=4294967296;
set global maria_log_file_size=4294967295;
use test;
......
......@@ -166,3 +166,13 @@ void my_uuid(uchar *to)
int2store(to+6, time_hi_and_version);
bmove(to+8, uuid_suffix, sizeof(uuid_suffix));
}
void my_uuid_end()
{
if (my_uuid_inited)
{
my_uuid_inited= 0;
pthread_mutex_destroy(&LOCK_uuid_generator);
}
}
......@@ -566,7 +566,7 @@ pthread_key(MEM_ROOT**,THR_MALLOC);
pthread_key(THD*, THR_THD);
pthread_mutex_t LOCK_mysql_create_db, LOCK_Acl, LOCK_open, LOCK_thread_count,
LOCK_mapped_file, LOCK_status, LOCK_global_read_lock,
LOCK_error_log, LOCK_uuid_generator,
LOCK_error_log,
LOCK_delayed_insert, LOCK_delayed_status, LOCK_delayed_create,
LOCK_crypt, LOCK_bytes_sent, LOCK_bytes_received,
LOCK_global_system_variables,
......@@ -1282,6 +1282,7 @@ void clean_up(bool print_message)
/* do the broadcast inside the lock to ensure that my_end() is not called */
(void) pthread_cond_broadcast(&COND_thread_count);
(void) pthread_mutex_unlock(&LOCK_thread_count);
my_uuid_end();
/*
The following lines may never be executed as the main thread may have
......@@ -1354,7 +1355,6 @@ static void clean_up_mutexes()
(void) pthread_mutex_destroy(&LOCK_global_system_variables);
(void) rwlock_destroy(&LOCK_system_variables_hash);
(void) pthread_mutex_destroy(&LOCK_global_read_lock);
(void) pthread_mutex_destroy(&LOCK_uuid_generator);
(void) pthread_mutex_destroy(&LOCK_prepared_stmt_count);
(void) pthread_cond_destroy(&COND_thread_count);
(void) pthread_cond_destroy(&COND_refresh);
......@@ -3105,7 +3105,6 @@ static int init_thread_environment()
(void) my_rwlock_init(&LOCK_system_variables_hash, NULL);
(void) pthread_mutex_init(&LOCK_global_read_lock, MY_MUTEX_INIT_FAST);
(void) pthread_mutex_init(&LOCK_prepared_stmt_count, MY_MUTEX_INIT_FAST);
(void) pthread_mutex_init(&LOCK_uuid_generator, MY_MUTEX_INIT_FAST);
#ifdef HAVE_OPENSSL
(void) pthread_mutex_init(&LOCK_des_key_file,MY_MUTEX_INIT_FAST);
#ifndef HAVE_YASSL
......
......@@ -173,5 +173,13 @@ SUFFIXES = .sh
tags:
etags *.h *.c *.cc
unittests = unittest
test:
perl $(top_srcdir)/unittest/unit.pl run $(unittests)
test-verbose:
HARNESS_VERBOSE=1 perl $(top_srcdir)/unittest/unit.pl run $(unittests)
# Don't update the files from bitkeeper
%::SCCS/s.%
......@@ -603,6 +603,7 @@ uint _ma_apply_redo_index_new_page(MARIA_HA *info, LSN lsn,
}
/* Write modified page */
bzero(buff, LSN_STORE_SIZE);
memcpy(buff + LSN_STORE_SIZE, header, length);
bzero(buff + LSN_STORE_SIZE + length,
share->block_size - LSN_STORE_SIZE - KEYPAGE_CHECKSUM_SIZE - length);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment