Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
bbcd5429
Commit
bbcd5429
authored
Jan 26, 2005
by
ingo@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge from 4.1
Archive fix by Ingo. Innodb compile fix by Monty.
parents
be5dade8
300337ce
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
74 additions
and
25 deletions
+74
-25
BUILD/SETUP.sh
BUILD/SETUP.sh
+6
-2
BUILD/compile-pentium64-debug
BUILD/compile-pentium64-debug
+1
-1
configure.in
configure.in
+3
-3
innobase/include/univ.i
innobase/include/univ.i
+4
-0
mysql-test/t/archive.test
mysql-test/t/archive.test
+1
-1
sql/examples/ha_archive.cc
sql/examples/ha_archive.cc
+41
-18
sql/examples/ha_archive.h
sql/examples/ha_archive.h
+4
-0
sql/handler.cc
sql/handler.cc
+14
-0
No files found.
BUILD/SETUP.sh
100644 → 100755
View file @
bbcd5429
...
@@ -25,7 +25,10 @@ Any other options will be passed directly to configure.
...
@@ -25,7 +25,10 @@ Any other options will be passed directly to configure.
Note: this script is intended for internal use by MySQL developers.
Note: this script is intended for internal use by MySQL developers.
EOF
EOF
--with-debug
=
full
)
full_debug
=
"=full"
;
shift
;;
--with-debug
=
full
)
full_debug
=
"=full"
;
shift
;;
*
)
break
;;
*
)
echo
"Unknown option '
$1
'"
exit
1
break
;;
esac
esac
done
done
...
@@ -62,6 +65,7 @@ fast_cflags="-O3 -fno-omit-frame-pointer"
...
@@ -62,6 +65,7 @@ fast_cflags="-O3 -fno-omit-frame-pointer"
reckless_cflags
=
"-O3 -fomit-frame-pointer "
reckless_cflags
=
"-O3 -fomit-frame-pointer "
debug_cflags
=
"-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX"
debug_cflags
=
"-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX"
debug_extra_cflags
=
"-O1 -Wuninitialized"
base_cxxflags
=
"-felide-constructors -fno-exceptions -fno-rtti"
base_cxxflags
=
"-felide-constructors -fno-exceptions -fno-rtti"
amd64_cxxflags
=
"-DBIG_TABLES"
amd64_cxxflags
=
"-DBIG_TABLES"
...
@@ -80,7 +84,7 @@ local_infile_configs="--enable-local-infile"
...
@@ -80,7 +84,7 @@ local_infile_configs="--enable-local-infile"
debug_configs
=
"--with-debug
$full_debug
"
debug_configs
=
"--with-debug
$full_debug
"
if
[
-z
"
$full_debug
"
]
if
[
-z
"
$full_debug
"
]
then
then
debug_cflags
=
"
$debug_cflags
-O1 -Wuninitialized
"
debug_cflags
=
"
$debug_cflags
$debug_extra_cflags
"
fi
fi
if
gmake
--version
>
/dev/null 2>&1
if
gmake
--version
>
/dev/null 2>&1
...
...
BUILD/compile-pentium64-debug
View file @
bbcd5429
#! /bin/sh
#! /bin/sh
path
=
`
dirname
$0
`
path
=
`
dirname
$0
`
.
"
$path
/SETUP.sh"
.
"
$path
/SETUP.sh"
$@
--with-debug
=
full
extra_flags
=
"
$pentium64_cflags
$debug_cflags
"
extra_flags
=
"
$pentium64_cflags
$debug_cflags
"
c_warnings
=
"
$c_warnings
$debug_extra_warnings
"
c_warnings
=
"
$c_warnings
$debug_extra_warnings
"
...
...
configure.in
View file @
bbcd5429
...
@@ -1678,12 +1678,12 @@ if test "$with_debug" = "yes"
...
@@ -1678,12 +1678,12 @@ if test "$with_debug" = "yes"
then
then
# Medium debug.
# Medium debug.
CFLAGS="
$DEBUG_CFLAGS
$DEBUG_OPTIMIZE_CC
-DDBUG_ON
-DSAFE_MUTEX
$CFLAGS
"
CFLAGS="
$DEBUG_CFLAGS
$DEBUG_OPTIMIZE_CC
-DDBUG_ON
-DSAFE_MUTEX
$CFLAGS
"
CXXFLAGS="
$DEBUG_CXXFLAGS
$DEBUG_OPTIMIZE_CXX
-DSAFE_MUTEX
$CXXFLAGS
"
CXXFLAGS="
$DEBUG_CXXFLAGS
$DEBUG_OPTIMIZE_CXX
-D
DBUG_ON
-D
SAFE_MUTEX
$CXXFLAGS
"
elif test "
$with_debug
" = "
full
"
elif test "
$with_debug
" = "
full
"
then
then
# Full debug. Very slow in some cases
# Full debug. Very slow in some cases
CFLAGS="
$DEBUG_CFLAGS
-DDBUG_ON
-DSAFE_MUTEX
-DSAFEMALLOC
$CFLAGS
"
CFLAGS="
$DEBUG_CFLAGS
-DDBUG_ON
-DSAFE_MUTEX
-DSAFEMALLOC
-DUNIV_DEBUG
$CFLAGS
"
CXXFLAGS="
$DEBUG_CXXFLAGS
-D
SAFE_MUTEX
-DSAFEMALLOC
$CXXFLAGS
"
CXXFLAGS="
$DEBUG_CXXFLAGS
-D
DBUG_ON
-DSAFE_MUTEX
-DSAFEMALLOC
-DUNIV_DEBUG
$CXXFLAGS
"
else
else
# Optimized version. No debug
# Optimized version. No debug
CFLAGS="
$OPTIMIZE_CFLAGS
-DDBUG_OFF
$CFLAGS
"
CFLAGS="
$OPTIMIZE_CFLAGS
-DDBUG_OFF
$CFLAGS
"
...
...
innobase/include/univ.i
View file @
bbcd5429
...
@@ -80,6 +80,10 @@ memory is read outside the allocated blocks. */
...
@@ -80,6 +80,10 @@ memory is read outside the allocated blocks. */
/* Make a non-inline debug version */
/* Make a non-inline debug version */
#
ifdef
DBUG_ON
#
define
UNIV_DEBUG
#
endif
/* DBUG_ON */
/*
/*
#define UNIV_DEBUG
#define UNIV_DEBUG
#define UNIV_MEM_DEBUG
#define UNIV_MEM_DEBUG
...
...
mysql-test/t/archive.test
View file @
bbcd5429
#
#
# Simple test for archive example
# Simple test for archive example
# Taken from
m
the select test
# Taken from the select test
#
#
--
source
include
/
have_archive
.
inc
--
source
include
/
have_archive
.
inc
...
...
sql/examples/ha_archive.cc
View file @
bbcd5429
...
@@ -117,7 +117,6 @@
...
@@ -117,7 +117,6 @@
/* Variables for archive share methods */
/* Variables for archive share methods */
pthread_mutex_t
archive_mutex
;
pthread_mutex_t
archive_mutex
;
static
HASH
archive_open_tables
;
static
HASH
archive_open_tables
;
static
int
archive_init
=
0
;
/* The file extension */
/* The file extension */
#define ARZ ".ARZ" // The data file
#define ARZ ".ARZ" // The data file
...
@@ -143,6 +142,46 @@ static byte* archive_get_key(ARCHIVE_SHARE *share,uint *length,
...
@@ -143,6 +142,46 @@ static byte* archive_get_key(ARCHIVE_SHARE *share,uint *length,
return
(
byte
*
)
share
->
table_name
;
return
(
byte
*
)
share
->
table_name
;
}
}
/*
Initialize the archive handler.
SYNOPSIS
archive_db_init()
void
RETURN
FALSE OK
TRUE Error
*/
bool
archive_db_init
()
{
VOID
(
pthread_mutex_init
(
&
archive_mutex
,
MY_MUTEX_INIT_FAST
));
return
(
hash_init
(
&
archive_open_tables
,
system_charset_info
,
32
,
0
,
0
,
(
hash_get_key
)
archive_get_key
,
0
,
0
));
}
/*
Release the archive handler.
SYNOPSIS
archive_db_end()
void
RETURN
FALSE OK
*/
bool
archive_db_end
()
{
hash_free
(
&
archive_open_tables
);
VOID
(
pthread_mutex_destroy
(
&
archive_mutex
));
return
FALSE
;
}
/*
/*
This method reads the header of a datafile and returns whether or not it was successful.
This method reads the header of a datafile and returns whether or not it was successful.
*/
*/
...
@@ -269,23 +308,6 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, TABLE *table)
...
@@ -269,23 +308,6 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, TABLE *table)
uint
length
;
uint
length
;
char
*
tmp_name
;
char
*
tmp_name
;
if
(
!
archive_init
)
{
/* Hijack a mutex for init'ing the storage engine */
pthread_mutex_lock
(
&
LOCK_mysql_create_db
);
if
(
!
archive_init
)
{
VOID
(
pthread_mutex_init
(
&
archive_mutex
,
MY_MUTEX_INIT_FAST
));
if
(
hash_init
(
&
archive_open_tables
,
system_charset_info
,
32
,
0
,
0
,
(
hash_get_key
)
archive_get_key
,
0
,
0
))
{
pthread_mutex_unlock
(
&
LOCK_mysql_create_db
);
return
NULL
;
}
archive_init
++
;
}
pthread_mutex_unlock
(
&
LOCK_mysql_create_db
);
}
pthread_mutex_lock
(
&
archive_mutex
);
pthread_mutex_lock
(
&
archive_mutex
);
length
=
(
uint
)
strlen
(
table_name
);
length
=
(
uint
)
strlen
(
table_name
);
...
@@ -371,6 +393,7 @@ int ha_archive::free_share(ARCHIVE_SHARE *share)
...
@@ -371,6 +393,7 @@ int ha_archive::free_share(ARCHIVE_SHARE *share)
(
void
)
write_meta_file
(
share
->
meta_file
,
share
->
rows_recorded
,
FALSE
);
(
void
)
write_meta_file
(
share
->
meta_file
,
share
->
rows_recorded
,
FALSE
);
if
(
gzclose
(
share
->
archive_write
)
==
Z_ERRNO
)
if
(
gzclose
(
share
->
archive_write
)
==
Z_ERRNO
)
rc
=
1
;
rc
=
1
;
my_close
(
share
->
meta_file
,
MYF
(
0
));
my_free
((
gptr
)
share
,
MYF
(
0
));
my_free
((
gptr
)
share
,
MYF
(
0
));
}
}
pthread_mutex_unlock
(
&
archive_mutex
);
pthread_mutex_unlock
(
&
archive_mutex
);
...
...
sql/examples/ha_archive.h
View file @
bbcd5429
...
@@ -105,3 +105,7 @@ public:
...
@@ -105,3 +105,7 @@ public:
THR_LOCK_DATA
**
store_lock
(
THD
*
thd
,
THR_LOCK_DATA
**
to
,
THR_LOCK_DATA
**
store_lock
(
THD
*
thd
,
THR_LOCK_DATA
**
to
,
enum
thr_lock_type
lock_type
);
enum
thr_lock_type
lock_type
);
};
};
bool
archive_db_init
(
void
);
bool
archive_db_end
(
void
);
sql/handler.cc
View file @
bbcd5429
...
@@ -372,6 +372,16 @@ int ha_init()
...
@@ -372,6 +372,16 @@ int ha_init()
else
else
opt_using_transactions
=
1
;
opt_using_transactions
=
1
;
}
}
#endif
#ifdef HAVE_ARCHIVE_DB
if
(
have_archive_db
==
SHOW_OPTION_YES
)
{
if
(
archive_db_init
())
{
have_archive_db
=
SHOW_OPTION_DISABLED
;
error
=
1
;
}
}
#endif
#endif
return
error
;
return
error
;
}
}
...
@@ -403,6 +413,10 @@ int ha_panic(enum ha_panic_function flag)
...
@@ -403,6 +413,10 @@ int ha_panic(enum ha_panic_function flag)
#ifdef HAVE_NDBCLUSTER_DB
#ifdef HAVE_NDBCLUSTER_DB
if
(
have_ndbcluster
==
SHOW_OPTION_YES
)
if
(
have_ndbcluster
==
SHOW_OPTION_YES
)
error
|=
ndbcluster_end
();
error
|=
ndbcluster_end
();
#endif
#ifdef HAVE_ARCHIVE_DB
if
(
have_archive_db
==
SHOW_OPTION_YES
)
error
|=
archive_db_end
();
#endif
#endif
if
(
ha_finish_errors
())
if
(
ha_finish_errors
())
error
=
1
;
error
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment