summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-23 17:15:07 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-23 17:15:07 -0300
commitcc3a26289d7b3e8275bf26f7c7d5682f8c86f2ad (patch)
tree6a6d06ccca15bd33f316633d542c8be2470ffcca
parent7a221fc9a30888fc30bd0ef79445829896572d97 (diff)
downloadmariadb-git-cc3a26289d7b3e8275bf26f7c7d5682f8c86f2ad.tar.gz
WL#5498: Remove dead and unused source code
Remove the ancient and dead raid code. By now, even the server side has been removed.
-rw-r--r--client/mysql.cc4
-rw-r--r--extra/replace.c1
-rw-r--r--extra/resolve_stack_dump.c1
-rw-r--r--include/my_global.h18
-rw-r--r--include/my_nosys.h2
-rw-r--r--include/my_sys.h2
-rw-r--r--include/myisam.h3
-rw-r--r--include/mysql_embed.h2
-rw-r--r--libmysql/Makefile.am4
-rw-r--r--libmysql_r/Makefile.am3
-rw-r--r--mysql-test/r/raid.result208
-rw-r--r--mysql-test/t/show_check.test2
-rw-r--r--mysys/mf_iocache.c1
-rw-r--r--mysys/mf_iocache2.c1
-rw-r--r--storage/myisam/mi_check.c92
-rw-r--r--storage/myisam/mi_create.c20
-rw-r--r--storage/myisam/mi_delete_table.c33
-rw-r--r--storage/myisam/mi_open.c53
-rw-r--r--storage/myisam/mi_rename.c21
-rw-r--r--storage/myisam/myisamchk.c40
-rw-r--r--storage/myisam/myisamdef.h8
21 files changed, 55 insertions, 464 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index abf01d8127d..d768a01eb5d 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -627,10 +627,6 @@ static COMMANDS commands[] = {
{ "QUARTER", 0, 0, 0, ""},
{ "QUERY", 0, 0, 0, ""},
{ "QUICK", 0, 0, 0, ""},
- { "RAID0", 0, 0, 0, ""},
- { "RAID_CHUNKS", 0, 0, 0, ""},
- { "RAID_CHUNKSIZE", 0, 0, 0, ""},
- { "RAID_TYPE", 0, 0, 0, ""},
{ "READ", 0, 0, 0, ""},
{ "READS", 0, 0, 0, ""},
{ "REAL", 0, 0, 0, ""},
diff --git a/extra/replace.c b/extra/replace.c
index bbe70ba586e..5b5f9cee6f8 100644
--- a/extra/replace.c
+++ b/extra/replace.c
@@ -39,7 +39,6 @@
fill_buffer_retaining() is taken from gnu-grep and modified.
*/
-#define DONT_USE_RAID
#include <my_global.h>
#include <m_ctype.h>
#include <my_sys.h>
diff --git a/extra/resolve_stack_dump.c b/extra/resolve_stack_dump.c
index 432a207f424..6ea818c601b 100644
--- a/extra/resolve_stack_dump.c
+++ b/extra/resolve_stack_dump.c
@@ -17,7 +17,6 @@
versions into symbolic names. By Sasha Pachev <sasha@mysql.com>
*/
-#define DONT_USE_RAID
#include <my_global.h>
#include <m_ctype.h>
#include <my_sys.h>
diff --git a/include/my_global.h b/include/my_global.h
index b7ec40fc2e0..33eaefefe62 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -1125,22 +1125,6 @@ typedef long long intptr;
#define MY_ERRPTR ((void*)(intptr)1)
-#ifdef USE_RAID
-/*
- The following is done with a if to not get problems with pre-processors
- with late define evaluation
-*/
-#if SIZEOF_OFF_T == 4
-#define SYSTEM_SIZEOF_OFF_T 4
-#else
-#define SYSTEM_SIZEOF_OFF_T 8
-#endif
-#undef SIZEOF_OFF_T
-#define SIZEOF_OFF_T 8
-#else
-#define SYSTEM_SIZEOF_OFF_T SIZEOF_OFF_T
-#endif /* USE_RAID */
-
#if defined(_WIN32)
typedef unsigned long long my_off_t;
typedef unsigned long long os_off_t;
@@ -1699,8 +1683,6 @@ static inline double rint(double x)
#undef HAVE_SMEM /* No shared memory */
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
-#define DONT_USE_RAID
-
#endif /* EMBEDDED_LIBRARY */
#endif /* my_global_h */
diff --git a/include/my_nosys.h b/include/my_nosys.h
index ecb60333830..96ba6d4c464 100644
--- a/include/my_nosys.h
+++ b/include/my_nosys.h
@@ -30,7 +30,7 @@ extern "C" {
#include <malloc.h>
#endif
-#undef my_read /* Can be predefined in raid.h */
+#undef my_read
#undef my_write
#undef my_seek
#define my_read(a,b,c,d) my_quick_read(a,b,c,d)
diff --git a/include/my_sys.h b/include/my_sys.h
index 369a6b5b82b..95689535be5 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -78,7 +78,7 @@ extern int my_errno; /* Last error in mysys */
#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
#define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */
#define MY_SYNC_DIR 8192 /* my_create/delete/rename: sync directory */
-#define MY_RAID 64 /* Support for RAID */
+#define MY_UNUSED 64 /* Unused (was support for RAID) */
#define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */
#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */
diff --git a/include/myisam.h b/include/myisam.h
index 450b1cf366c..3efc65a900a 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -481,8 +481,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
const char * name, int rep_quick);
int change_to_newfile(const char * filename, const char * old_ext,
- const char * new_ext, uint raid_chunks,
- myf myflags);
+ const char * new_ext, myf myflags);
int lock_file(MI_CHECK *param, File file, my_off_t start, int lock_type,
const char *filetype, const char *filename);
void lock_memory(MI_CHECK *param);
diff --git a/include/mysql_embed.h b/include/mysql_embed.h
index b26b723381d..ae70b9723f8 100644
--- a/include/mysql_embed.h
+++ b/include/mysql_embed.h
@@ -28,7 +28,5 @@
#undef HAVE_SMEM /* No shared memory */
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
-#define DONT_USE_RAID
-
#endif /* EMBEDDED_LIBRARY */
#endif /* MYSQL_EMBED_INCLUDED */
diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am
index 34bd443c0d0..07f66c28ddb 100644
--- a/libmysql/Makefile.am
+++ b/libmysql/Makefile.am
@@ -21,8 +21,8 @@
# This file is public domain and comes with NO WARRANTY of any kind
target = libmysqlclient.la
-target_defs = -DMYSQL_CLIENT_NO_THREADS -DDONT_USE_RAID \
- -DDISABLE_MYSQL_THREAD_H @LIB_EXTRA_CCFLAGS@
+target_defs = -DMYSQL_CLIENT_NO_THREADS -DDISABLE_MYSQL_THREAD_H \
+ @LIB_EXTRA_CCFLAGS@
LIBS = @CLIENT_LIBS@
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
diff --git a/libmysql_r/Makefile.am b/libmysql_r/Makefile.am
index dab45d93673..30aa2467dab 100644
--- a/libmysql_r/Makefile.am
+++ b/libmysql_r/Makefile.am
@@ -21,8 +21,7 @@
# This file is public domain and comes with NO WARRANTY of any kind
target = libmysqlclient_r.la
-target_defs = -DDISABLE_MYSQL_PRLOCK_H -DDONT_USE_RAID \
- -DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@
+target_defs = -DDISABLE_MYSQL_PRLOCK_H -DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@
LIBS = @LIBS@ @ZLIB_LIBS@ @openssl_libs@
diff --git a/mysql-test/r/raid.result b/mysql-test/r/raid.result
deleted file mode 100644
index 459da1cdf49..00000000000
--- a/mysql-test/r/raid.result
+++ /dev/null
@@ -1,208 +0,0 @@
-DROP TABLE IF EXISTS t1,t2;
-DROP DATABASE IF EXISTS test_$1;
-create database test_$1;
-create table test_$1.r1 (i int) raid_type=1;
-create table test_$1.r2 (i int) raid_type=1 raid_chunks=32;
-drop database test_$1;
-create database test_$1;
-create table test_$1.r2 (i int) raid_type=1 raid_chunks=257;
-show create table test_$1.r2;
-Table Create Table
-r2 CREATE TABLE `r2` (
- `i` int(11) default NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 RAID_TYPE=striped RAID_CHUNKS=255 RAID_CHUNKSIZE=256
-drop database test_$1;
-CREATE TABLE t1 (
-id int unsigned not null auto_increment primary key,
-c char(255) not null
-) RAID_TYPE=STRIPED RAID_CHUNKS=2 RAID_CHUNKSIZE=123;
-INSERT INTO t1 VALUES
-(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
-(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
-(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
-(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
-(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
-(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
-(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
-(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
-(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
-(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
-(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
-(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
-(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
-(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
-(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
-INSERT INTO t1 VALUES
-(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
-(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
-(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
-(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
-(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
-(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
-(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
-(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
-(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
-(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
-(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
-(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
-(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
-(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
-(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
-INSERT INTO t1 VALUES
-(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
-(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
-(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
-(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
-(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
-(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
-(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
-(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
-(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
-(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
-(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
-(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
-(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
-(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
-(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
-INSERT INTO t1 VALUES
-(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
-(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
-(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
-(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
-(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
-(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
-(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
-(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
-(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
-(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
-(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
-(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
-(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
-(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
-(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
-INSERT INTO t1 VALUES
-(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
-(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
-(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
-(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
-(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
-(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
-(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
-(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
-(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
-(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
-(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
-(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
-(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
-(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
-(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
-select count(*) from t1;
-count(*)
-450
-ALTER TABLE t1 ADD COLUMN x INT UNSIGNED NOT NULL;
-ALTER TABLE t1 ADD KEY c (c);
-ALTER TABLE t1 DROP KEY c;
-ALTER TABLE t1 DROP COLUMN x;
-ALTER TABLE t1 RENAME t2;
-select count(*) from t2;
-count(*)
-450
-DROP TABLE t2;
-/* variable rows */
-CREATE TABLE t1 (
-id int unsigned not null auto_increment primary key,
-c varchar(255) not null
-) RAID_TYPE=STRIPED RAID_CHUNKS=5 RAID_CHUNKSIZE=121;
-INSERT INTO t1 VALUES
-(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
-(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
-(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
-(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
-(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
-(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
-(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
-(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
-(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
-(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
-(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
-(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
-(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
-(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
-(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
-INSERT INTO t1 VALUES
-(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
-(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
-(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
-(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
-(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
-(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
-(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
-(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
-(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
-(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
-(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
-(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
-(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
-(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
-(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
-INSERT INTO t1 VALUES
-(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
-(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
-(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
-(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
-(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
-(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
-(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
-(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
-(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
-(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
-(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
-(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
-(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
-(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
-(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
-INSERT INTO t1 VALUES
-(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
-(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
-(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
-(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
-(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
-(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
-(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
-(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
-(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
-(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
-(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
-(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
-(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
-(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
-(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
-INSERT INTO t1 VALUES
-(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
-(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
-(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
-(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
-(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
-(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
-(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
-(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
-(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
-(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
-(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
-(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
-(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
-(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
-(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
-select count(*) from t1;
-count(*)
-450
-ALTER TABLE t1 ADD COLUMN x INT UNSIGNED NOT NULL;
-ALTER TABLE t1 ADD KEY c (c);
-ALTER TABLE t1 DROP KEY c;
-ALTER TABLE t1 DROP COLUMN x;
-ALTER TABLE t1 RENAME t2;
-ALTER TABLE t2 CHANGE COLUMN c c VARCHAR(251) NOT NULL;
-select count(*) from t2;
-count(*)
-450
-DROP TABLE t2;
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index fa003c2fe69..3821701ad19 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -173,7 +173,7 @@ type_long_blob longblob,
index(type_short)
) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed CHARSET=latin1;
-# Not tested above: RAID_# UNION INSERT_METHOD DATA DIRECTORY INDEX DIRECTORY
+# Not tested above: UNION INSERT_METHOD DATA DIRECTORY INDEX DIRECTORY
show create table t1;
insert into t1 (type_timestamp) values ("2003-02-07 10:00:01");
select * from t1;
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index daacc08044b..c4bba9c4e72 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -47,7 +47,6 @@ TODO:
write buffer to the read buffer before we start to reuse it.
*/
-#define MAP_TO_USE_RAID
#include "mysys_priv.h"
#include <m_string.h>
#ifdef HAVE_AIOWAIT
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c
index 5e34bff2b51..e940fc31c30 100644
--- a/mysys/mf_iocache2.c
+++ b/mysys/mf_iocache2.c
@@ -17,7 +17,6 @@
More functions to be used with IO_CACHE files
*/
-#define MAP_TO_USE_RAID
#include "mysys_priv.h"
#include <m_string.h>
#include <stdarg.h>
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index 13427130069..6bf01cd63c7 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -52,11 +52,6 @@
#endif
#include "rt_index.h"
-#ifndef USE_RAID
-#define my_raid_create(K, A, B, C, D, E, F, G) mysql_file_create(K, A, B, C, G)
-#define my_raid_delete(K, A, B, C) mysql_file_delete(K, A, B)
-#endif
-
/* Functions defined in this file */
static int check_k_link(MI_CHECK *param, MI_INFO *info,uint nr);
@@ -1577,15 +1572,12 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
if (!rep_quick)
{
/* Get real path for data file */
- if ((new_file= my_raid_create(mi_key_file_datatmp,
- fn_format(param->temp_filename,
- share->data_file_name, "",
- DATA_TMP_EXT, 2+4),
- 0, param->tmpfile_createflag,
- share->base.raid_type,
- share->base.raid_chunks,
- share->base.raid_chunksize,
- MYF(0))) < 0)
+ if ((new_file= mysql_file_create(mi_key_file_datatmp,
+ fn_format(param->temp_filename,
+ share->data_file_name, "",
+ DATA_TMP_EXT, 2+4),
+ 0, param->tmpfile_createflag,
+ MYF(0))) < 0)
{
mi_check_print_error(param,"Can't create new tempfile: '%s'",
param->temp_filename);
@@ -1751,8 +1743,7 @@ err:
(size_t) info->s->mmaped_length);
info->s->file_map= NULL;
}
- if (change_to_newfile(share->data_file_name,MI_NAME_DEXT,
- DATA_TMP_EXT, share->base.raid_chunks,
+ if (change_to_newfile(share->data_file_name, MI_NAME_DEXT, DATA_TMP_EXT,
(param->testflag & T_BACKUP_DATA ?
MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
mi_open_datafile(info,share,name,-1))
@@ -1767,9 +1758,8 @@ err:
if (new_file >= 0)
{
(void) mysql_file_close(new_file, MYF(0));
- (void) my_raid_delete(mi_key_file_datatmp,
- param->temp_filename, info->s->base.raid_chunks,
- MYF(MY_WME));
+ (void) mysql_file_delete(mi_key_file_datatmp,
+ param->temp_filename, MYF(MY_WME));
info->rec_cache.file=-1; /* don't flush data to new_file, it's closed */
}
mi_mark_crashed_on_repair(info);
@@ -2011,7 +2001,7 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name)
(void) mysql_file_close(share->kfile, MYF(MY_WME));
share->kfile = -1;
(void) mysql_file_close(new_file, MYF(MY_WME));
- if (change_to_newfile(share->index_file_name,MI_NAME_IEXT,INDEX_TMP_EXT,0,
+ if (change_to_newfile(share->index_file_name, MI_NAME_IEXT, INDEX_TMP_EXT,
MYF(0)) ||
mi_open_keyfile(share))
goto err2;
@@ -2141,18 +2131,9 @@ err:
*/
int change_to_newfile(const char * filename, const char * old_ext,
- const char * new_ext,
- uint raid_chunks __attribute__((unused)),
- myf MyFlags)
+ const char * new_ext, myf MyFlags)
{
char old_filename[FN_REFLEN],new_filename[FN_REFLEN];
-#ifdef USE_RAID
- if (raid_chunks)
- return my_raid_redel(fn_format(old_filename,filename,"",old_ext,2+4),
- fn_format(new_filename,filename,"",new_ext,2+4),
- raid_chunks,
- MYF(MY_WME | MY_LINK_WARNING | MyFlags));
-#endif
/* Get real path to filename */
(void) fn_format(old_filename,filename,"",old_ext,2+4+32);
return my_redel(old_filename,
@@ -2293,15 +2274,12 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
if (!rep_quick)
{
/* Get real path for data file */
- if ((new_file= my_raid_create(mi_key_file_datatmp,
- fn_format(param->temp_filename,
- share->data_file_name, "",
- DATA_TMP_EXT, 2+4),
- 0, param->tmpfile_createflag,
- share->base.raid_type,
- share->base.raid_chunks,
- share->base.raid_chunksize,
- MYF(0))) < 0)
+ if ((new_file= mysql_file_create(mi_key_file_datatmp,
+ fn_format(param->temp_filename,
+ share->data_file_name, "",
+ DATA_TMP_EXT, 2+4),
+ 0, param->tmpfile_createflag,
+ MYF(0))) < 0)
{
mi_check_print_error(param,"Can't create new tempfile: '%s'",
param->temp_filename);
@@ -2527,7 +2505,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
skr < share->base.reloc*share->base.min_pack_length)
skr=share->base.reloc*share->base.min_pack_length;
#endif
- if (skr != sort_info.filelength && !info->s->base.raid_type)
+ if (skr != sort_info.filelength)
if (mysql_file_chsize(info->dfile, skr, 0, MYF(0)))
mi_check_print_warning(param,
"Can't change size of datafile, error: %d",
@@ -2565,8 +2543,7 @@ err:
{
mysql_file_close(new_file, MYF(0));
info->dfile=new_file= -1;
- if (change_to_newfile(share->data_file_name,MI_NAME_DEXT,
- DATA_TMP_EXT, share->base.raid_chunks,
+ if (change_to_newfile(share->data_file_name,MI_NAME_DEXT, DATA_TMP_EXT,
(param->testflag & T_BACKUP_DATA ?
MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
mi_open_datafile(info,share,name,-1))
@@ -2580,9 +2557,8 @@ err:
if (new_file >= 0)
{
(void) mysql_file_close(new_file, MYF(0));
- (void) my_raid_delete(mi_key_file_datatmp,
- param->temp_filename, share->base.raid_chunks,
- MYF(MY_WME));
+ (void) mysql_file_delete(mi_key_file_datatmp,
+ param->temp_filename, MYF(MY_WME));
if (info->dfile == new_file) /* Retry with key cache */
if (unlikely(mi_open_datafile(info, share, name, -1)))
param->retry_repair= 0; /* Safety */
@@ -2751,16 +2727,12 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
if (!rep_quick)
{
/* Get real path for data file */
- if ((new_file= my_raid_create(mi_key_file_datatmp,
- fn_format(param->temp_filename,
- share->data_file_name, "",
- DATA_TMP_EXT,
- 2+4),
- 0, param->tmpfile_createflag,
- share->base.raid_type,
- share->base.raid_chunks,
- share->base.raid_chunksize,
- MYF(0))) < 0)
+ if ((new_file= mysql_file_create(mi_key_file_datatmp,
+ fn_format(param->temp_filename,
+ share->data_file_name, "",
+ DATA_TMP_EXT, 2+4),
+ 0, param->tmpfile_createflag,
+ MYF(0))) < 0)
{
mi_check_print_error(param,"Can't create new tempfile: '%s'",
param->temp_filename);
@@ -3055,7 +3027,7 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
skr < share->base.reloc*share->base.min_pack_length)
skr=share->base.reloc*share->base.min_pack_length;
#endif
- if (skr != sort_info.filelength && !info->s->base.raid_type)
+ if (skr != sort_info.filelength)
if (mysql_file_chsize(info->dfile, skr, 0, MYF(0)))
mi_check_print_warning(param,
"Can't change size of datafile, error: %d",
@@ -3105,8 +3077,7 @@ err:
{
mysql_file_close(new_file, MYF(0));
info->dfile=new_file= -1;
- if (change_to_newfile(share->data_file_name,MI_NAME_DEXT,
- DATA_TMP_EXT, share->base.raid_chunks,
+ if (change_to_newfile(share->data_file_name, MI_NAME_DEXT, DATA_TMP_EXT,
(param->testflag & T_BACKUP_DATA ?
MYF(MY_REDEL_MAKE_BACKUP): MYF(0))) ||
mi_open_datafile(info,share,name,-1))
@@ -3120,9 +3091,8 @@ err:
if (new_file >= 0)
{
(void) mysql_file_close(new_file, MYF(0));
- (void) my_raid_delete(mi_key_file_datatmp,
- param->temp_filename, share->base.raid_chunks,
- MYF(MY_WME));
+ (void) mysql_file_delete(mi_key_file_datatmp,
+ param->temp_filename, MYF(MY_WME));
if (info->dfile == new_file) /* Retry with key cache */
if (unlikely(mi_open_datafile(info, share, name, -1)))
param->retry_repair= 0; /* Safety */
diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c
index 4a91c2d939b..46c61eb4709 100644
--- a/storage/myisam/mi_create.c
+++ b/storage/myisam/mi_create.c
@@ -549,11 +549,6 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
share.base.pack_bits=packed;
share.base.fields=fields;
share.base.pack_fields=packed;
-#ifdef USE_RAID
- share.base.raid_type=ci->raid_type;
- share.base.raid_chunks=ci->raid_chunks;
- share.base.raid_chunksize=ci->raid_chunksize;
-#endif
/* max_data_file_length and max_key_file_length are recalculated on open */
if (options & HA_OPTION_TMP_TABLE)
@@ -642,20 +637,6 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
if (!(flags & HA_DONT_TOUCH_DATA))
{
-#ifdef USE_RAID
- if (share.base.raid_type)
- {
- (void) fn_format(filename, name, "", MI_NAME_DEXT,
- MY_UNPACK_FILENAME | MY_APPEND_EXT);
- if ((dfile=my_raid_create(filename, 0, create_mode,
- share.base.raid_type,
- share.base.raid_chunks,
- share.base.raid_chunksize,
- MYF(MY_WME | MY_RAID))) < 0)
- goto err;
- }
- else
-#endif
{
if (ci->data_file_name)
{
@@ -841,7 +822,6 @@ err:
(void) mysql_file_close(dfile, MYF(0));
/* fall through */
case 2:
- /* QQ: Tõnu should add a call to my_raid_delete() here */
if (! (flags & HA_DONT_TOUCH_DATA))
mysql_file_delete_with_symlink(mi_key_file_dfile,
fn_format(filename, name, "", MI_NAME_DEXT,
diff --git a/storage/myisam/mi_delete_table.c b/storage/myisam/mi_delete_table.c
index 58a60a760aa..a05a2ad6237 100644
--- a/storage/myisam/mi_delete_table.c
+++ b/storage/myisam/mi_delete_table.c
@@ -22,40 +22,11 @@
int mi_delete_table(const char *name)
{
char from[FN_REFLEN];
-#ifdef USE_RAID
- uint raid_type=0,raid_chunks=0;
-#endif
DBUG_ENTER("mi_delete_table");
#ifdef EXTRA_DEBUG
check_table_is_closed(name,"delete");
#endif
-#ifdef USE_RAID
- {
- MI_INFO *info;
- /*
- When built with RAID support, we need to determine if this table
- makes use of the raid feature. If yes, we need to remove all raid
- chunks. This is done with my_raid_delete(). Unfortunately it is
- necessary to open the table just to check this. We use
- 'open_for_repair' to be able to open even a crashed table. If even
- this open fails, we assume no raid configuration for this table
- and try to remove the normal data file only. This may however
- leave the raid chunks behind.
- */
- if (!(info= mi_open(name, O_RDONLY, HA_OPEN_FOR_REPAIR)))
- raid_type= 0;
- else
- {
- raid_type= info->s->base.raid_type;
- raid_chunks= info->s->base.raid_chunks;
- mi_close(info);
- }
- }
-#ifdef EXTRA_DEBUG
- check_table_is_closed(name,"delete");
-#endif
-#endif /* USE_RAID */
fn_format(from,name,"",MI_NAME_IEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
if (my_is_symlink(from) && (*myisam_test_invalid_symlink)(from))
@@ -73,10 +44,6 @@ int mi_delete_table(const char *name)
DBUG_RETURN(my_errno);
}
fn_format(from,name,"",MI_NAME_DEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
-#ifdef USE_RAID
- if (raid_type)
- DBUG_RETURN(my_raid_delete(from, raid_chunks, MYF(MY_WME)) ? my_errno : 0);
-#endif
if (my_is_symlink(from) && (*myisam_test_invalid_symlink)(from))
{
/*
diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c
index 5b3da9841b8..2b2161ef029 100644
--- a/storage/myisam/mi_open.c
+++ b/storage/myisam/mi_open.c
@@ -260,25 +260,6 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
set_if_smaller(max_data_file_length, INT_MAX32);
set_if_smaller(max_key_file_length, INT_MAX32);
#endif
-#if USE_RAID && SYSTEM_SIZEOF_OFF_T == 4
- set_if_smaller(max_key_file_length, INT_MAX32);
- if (!share->base.raid_type)
- {
- set_if_smaller(max_data_file_length, INT_MAX32);
- }
- else
- {
- set_if_smaller(max_data_file_length,
- (ulonglong) share->base.raid_chunks << 31);
- }
-#elif !defined(USE_RAID)
- if (share->base.raid_type)
- {
- DBUG_PRINT("error",("Table uses RAID but we don't have RAID support"));
- my_errno=HA_ERR_UNSUPPORTED;
- goto err;
- }
-#endif
share->base.max_data_file_length=(my_off_t) max_data_file_length;
share->base.max_key_file_length=(my_off_t) max_key_file_length;
@@ -1036,10 +1017,7 @@ uint mi_base_info_write(File file, MI_BASE_INFO *base)
mi_int2store(ptr,base->max_key_length); ptr +=2;
mi_int2store(ptr,base->extra_alloc_bytes); ptr +=2;
*ptr++= base->extra_alloc_procent;
- *ptr++= base->raid_type;
- mi_int2store(ptr,base->raid_chunks); ptr +=2;
- mi_int4store(ptr,base->raid_chunksize); ptr +=4;
- bzero(ptr,6); ptr +=6; /* extra */
+ bzero(ptr,13); ptr +=13; /* extra */
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
}
@@ -1070,17 +1048,8 @@ uchar *my_n_base_info_read(uchar *ptr, MI_BASE_INFO *base)
base->max_key_length = mi_uint2korr(ptr); ptr +=2;
base->extra_alloc_bytes = mi_uint2korr(ptr); ptr +=2;
base->extra_alloc_procent = *ptr++;
- base->raid_type= *ptr++;
- base->raid_chunks= mi_uint2korr(ptr); ptr +=2;
- base->raid_chunksize= mi_uint4korr(ptr); ptr +=4;
- /* TO BE REMOVED: Fix for old RAID files */
- if (base->raid_type == 0)
- {
- base->raid_chunks=0;
- base->raid_chunksize=0;
- }
- ptr+=6;
+ ptr+=13;
return ptr;
}
@@ -1223,7 +1192,7 @@ uchar *mi_recinfo_read(uchar *ptr, MI_COLUMNDEF *recinfo)
}
/**************************************************************************
-Open data file with or without RAID
+Open data file.
We can't use dup() here as the data file descriptors need to have different
active seek-positions.
@@ -1251,20 +1220,8 @@ int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share, const char *org_name,
data_name= real_data_name;
}
}
-#ifdef USE_RAID
- if (share->base.raid_type)
- {
- info->dfile=my_raid_open(data_name,
- share->mode | O_SHARE,
- share->base.raid_type,
- share->base.raid_chunks,
- share->base.raid_chunksize,
- MYF(MY_WME | MY_RAID));
- }
- else
-#endif
- info->dfile= mysql_file_open(mi_key_file_dfile,
- data_name, share->mode | O_SHARE, MYF(MY_WME));
+ info->dfile= mysql_file_open(mi_key_file_dfile,
+ data_name, share->mode | O_SHARE, MYF(MY_WME));
return info->dfile >= 0 ? 0 : 1;
}
diff --git a/storage/myisam/mi_rename.c b/storage/myisam/mi_rename.c
index 56ccb333d03..455d45cecfe 100644
--- a/storage/myisam/mi_rename.c
+++ b/storage/myisam/mi_rename.c
@@ -22,28 +22,12 @@
int mi_rename(const char *old_name, const char *new_name)
{
char from[FN_REFLEN],to[FN_REFLEN];
-#ifdef USE_RAID
- uint raid_type=0,raid_chunks=0;
-#endif
DBUG_ENTER("mi_rename");
#ifdef EXTRA_DEBUG
check_table_is_closed(old_name,"rename old_table");
check_table_is_closed(new_name,"rename new table2");
#endif
-#ifdef USE_RAID
- {
- MI_INFO *info;
- if (!(info=mi_open(old_name, O_RDONLY, 0)))
- DBUG_RETURN(my_errno);
- raid_type = info->s->base.raid_type;
- raid_chunks = info->s->base.raid_chunks;
- mi_close(info);
- }
-#ifdef EXTRA_DEBUG
- check_table_is_closed(old_name,"rename raidcheck");
-#endif
-#endif /* USE_RAID */
fn_format(from,old_name,"",MI_NAME_IEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
fn_format(to,new_name,"",MI_NAME_IEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
@@ -51,11 +35,6 @@ int mi_rename(const char *old_name, const char *new_name)
DBUG_RETURN(my_errno);
fn_format(from,old_name,"",MI_NAME_DEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
fn_format(to,new_name,"",MI_NAME_DEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
-#ifdef USE_RAID
- if (raid_type)
- DBUG_RETURN(my_raid_rename(from, to, raid_chunks, MYF(MY_WME)) ? my_errno :
- 0);
-#endif
DBUG_RETURN(mysql_file_rename_with_symlink(mi_key_file_dfile,
from, to,
MYF(MY_WME)) ? my_errno : 0);
diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c
index e1cedf6bc31..6cc3ef9081b 100644
--- a/storage/myisam/myisamchk.c
+++ b/storage/myisam/myisamchk.c
@@ -29,11 +29,6 @@
#endif
SET_STACK_SIZE(9000) /* Minimum stack size for program */
-#ifndef USE_RAID
-#define my_raid_create(A,B,C,D,E,F,G) my_create(A,B,C,G)
-#define my_raid_delete(A,B,C) my_delete(A,B)
-#endif
-
static uint decode_bits;
static char **default_argv;
static const char *load_default_groups[]= { "myisamchk", 0 };
@@ -782,7 +777,6 @@ static int myisamchk(MI_CHECK *param, char * filename)
{
int error,lock_type,recreate;
int rep_quick= param->testflag & (T_QUICK | T_FORCE_UNIQUENESS);
- uint raid_chunks;
MI_INFO *info;
File datafile;
char llbuff[22],llbuff2[22];
@@ -844,7 +838,6 @@ static int myisamchk(MI_CHECK *param, char * filename)
share->options&= ~HA_OPTION_READ_ONLY_DATA; /* We are modifing it */
share->tot_locks-= share->r_locks;
share->r_locks=0;
- raid_chunks=share->base.raid_chunks;
/*
Skip the checking of the file if:
@@ -1013,9 +1006,7 @@ static int myisamchk(MI_CHECK *param, char * filename)
if (param->out_flag & O_NEW_DATA)
{ /* Change temp file to org file */
(void) my_close(info->dfile,MYF(MY_WME)); /* Close new file */
- error|=change_to_newfile(filename,MI_NAME_DEXT,DATA_TMP_EXT,
- raid_chunks,
- MYF(0));
+ error|=change_to_newfile(filename, MI_NAME_DEXT, DATA_TMP_EXT, MYF(0));
if (mi_open_datafile(info,info->s, NULL, -1))
error=1;
param->out_flag&= ~O_NEW_DATA; /* We are using new datafile */
@@ -1146,12 +1137,10 @@ end2:
{
if (param->out_flag & O_NEW_DATA)
error|=change_to_newfile(filename,MI_NAME_DEXT,DATA_TMP_EXT,
- raid_chunks,
((param->testflag & T_BACKUP_DATA) ?
MYF(MY_REDEL_MAKE_BACKUP) : MYF(0)));
if (param->out_flag & O_NEW_INDEX)
- error|=change_to_newfile(filename,MI_NAME_IEXT,INDEX_TMP_EXT,0,
- MYF(0));
+ error|=change_to_newfile(filename, MI_NAME_IEXT, INDEX_TMP_EXT, MYF(0));
}
(void) fflush(stdout); (void) fflush(stderr);
if (param->error_printed)
@@ -1247,16 +1236,9 @@ static void descript(MI_CHECK *param, register MI_INFO *info, char * name)
share->base.auto_key,
llstr(share->state.auto_increment,llbuff));
}
- if (share->base.raid_type)
- {
- printf("RAID: Type: %u Chunks: %u Chunksize: %lu\n",
- share->base.raid_type,
- share->base.raid_chunks,
- share->base.raid_chunksize);
- }
if (share->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD))
printf("Checksum: %23s\n",llstr(info->state->checksum,llbuff));
-;
+
if (share->options & HA_OPTION_DELAY_KEY_WRITE)
printf("Keys are only flushed at close\n");
@@ -1527,14 +1509,11 @@ static int mi_sort_records(MI_CHECK *param,
goto err;
}
fn_format(param->temp_filename,name,"", MI_NAME_DEXT,2+4+32);
- new_file=my_raid_create(fn_format(param->temp_filename,
- param->temp_filename,"",
- DATA_TMP_EXT,2+4),
- 0,param->tmpfile_createflag,
- share->base.raid_type,
- share->base.raid_chunks,
- share->base.raid_chunksize,
- MYF(0));
+ new_file= my_create(fn_format(param->temp_filename,
+ param->temp_filename, "",
+ DATA_TMP_EXT, 2+4),
+ 0, param->tmpfile_createflag,
+ MYF(0));
if (new_file < 0)
{
mi_check_print_error(param,"Can't create new tempfile: '%s'",
@@ -1609,8 +1588,7 @@ err:
{
(void) end_io_cache(&info->rec_cache);
(void) my_close(new_file,MYF(MY_WME));
- (void) my_raid_delete(param->temp_filename, share->base.raid_chunks,
- MYF(MY_WME));
+ (void) my_delete(param->temp_filename, MYF(MY_WME));
}
if (temp_buff)
{
diff --git a/storage/myisam/myisamdef.h b/storage/myisam/myisamdef.h
index 7312500abbd..c7f0cb27a40 100644
--- a/storage/myisam/myisamdef.h
+++ b/storage/myisam/myisamdef.h
@@ -26,8 +26,9 @@
#endif
#include <mysql/psi/mysql_file.h>
-#if defined(my_write) && !defined(MAP_TO_USE_RAID)
-#undef my_write /* undef map from my_nosys; We need test-if-disk full */
+/* undef map from my_nosys; We need test-if-disk full */
+#if defined(my_write)
+#undef my_write
#endif
typedef struct st_mi_status_info
@@ -130,9 +131,6 @@ typedef struct st_mi_base_info
/* Extra allocation when using dynamic record format */
uint extra_alloc_bytes;
uint extra_alloc_procent;
- /* Info about raid */
- uint raid_type,raid_chunks;
- ulong raid_chunksize;
/* The following are from the header */
uint key_parts,all_key_parts;
} MI_BASE_INFO;