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
9a817bea
Commit
9a817bea
authored
Mar 12, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge marko@build.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/l/mysql-4.0
parents
8f59091a
8b328b24
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
102 deletions
+49
-102
innobase/fil/fil0fil.c
innobase/fil/fil0fil.c
+3
-3
innobase/fsp/fsp0fsp.c
innobase/fsp/fsp0fsp.c
+1
-1
innobase/include/ut0dbg.h
innobase/include/ut0dbg.h
+24
-89
innobase/log/log0log.c
innobase/log/log0log.c
+7
-8
innobase/mem/mem0pool.c
innobase/mem/mem0pool.c
+1
-1
innobase/ut/ut0dbg.c
innobase/ut/ut0dbg.c
+13
-0
No files found.
innobase/fil/fil0fil.c
View file @
9a817bea
...
@@ -632,7 +632,7 @@ fil_space_create(
...
@@ -632,7 +632,7 @@ fil_space_create(
/* Spaces with an odd id number are reserved to replicate spaces
/* Spaces with an odd id number are reserved to replicate spaces
used in log debugging */
used in log debugging */
ut_a
np
((
purpose
==
FIL_LOG
)
||
(
id
%
2
==
0
));
ut_a
((
purpose
==
FIL_LOG
)
||
(
id
%
2
==
0
));
#endif
#endif
mutex_enter
(
&
(
system
->
mutex
));
mutex_enter
(
&
(
system
->
mutex
));
...
@@ -1230,8 +1230,8 @@ loop:
...
@@ -1230,8 +1230,8 @@ loop:
/* Do aio */
/* Do aio */
ut_a
np
(
byte_offset
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
ut_a
(
byte_offset
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
ut_a
np
((
len
%
OS_FILE_LOG_BLOCK_SIZE
)
==
0
);
ut_a
((
len
%
OS_FILE_LOG_BLOCK_SIZE
)
==
0
);
/* Queue the aio request */
/* Queue the aio request */
ret
=
os_aio
(
type
,
mode
|
wake_later
,
node
->
name
,
node
->
handle
,
buf
,
ret
=
os_aio
(
type
,
mode
|
wake_later
,
node
->
name
,
node
->
handle
,
buf
,
...
...
innobase/fsp/fsp0fsp.c
View file @
9a817bea
...
@@ -2940,7 +2940,7 @@ fseg_free_step(
...
@@ -2940,7 +2940,7 @@ fseg_free_step(
freed yet */
freed yet */
ut_a
(
descr
);
ut_a
(
descr
);
ut_a
np
(
xdes_get_bit
(
descr
,
XDES_FREE_BIT
,
buf_frame_get_page_no
(
header
)
ut_a
(
xdes_get_bit
(
descr
,
XDES_FREE_BIT
,
buf_frame_get_page_no
(
header
)
%
FSP_EXTENT_SIZE
,
mtr
)
==
FALSE
);
%
FSP_EXTENT_SIZE
,
mtr
)
==
FALSE
);
inode
=
fseg_inode_get
(
header
,
mtr
);
inode
=
fseg_inode_get
(
header
,
mtr
);
...
...
innobase/include/ut0dbg.h
View file @
9a817bea
...
@@ -10,7 +10,6 @@ Created 1/30/1994 Heikki Tuuri
...
@@ -10,7 +10,6 @@ Created 1/30/1994 Heikki Tuuri
#define ut0dbg_h
#define ut0dbg_h
#include "univ.i"
#include "univ.i"
#include <assert.h>
#include <stdlib.h>
#include <stdlib.h>
#include "os0thread.h"
#include "os0thread.h"
...
@@ -20,110 +19,46 @@ extern ibool ut_dbg_stop_threads;
...
@@ -20,110 +19,46 @@ extern ibool ut_dbg_stop_threads;
extern
ulint
*
ut_dbg_null_ptr
;
extern
ulint
*
ut_dbg_null_ptr
;
#define ut_a(EXPR)\
extern
const
char
*
ut_dbg_msg_assert_fail
;
{\
extern
const
char
*
ut_dbg_msg_trap
;
ulint dbg_i;\
extern
const
char
*
ut_dbg_msg_stop
;
\
if (!((ulint)(EXPR) + ut_dbg_zero)) {\
ut_print_timestamp(stderr);\
fprintf(stderr,\
" InnoDB: Assertion failure in thread %lu in file %s line %lu\n",\
os_thread_pf(os_thread_get_curr_id()), IB__FILE__,\
(ulint)__LINE__);\
fprintf(stderr,\
"InnoDB: Failing assertion: " #EXPR);\
fprintf(stderr,\
"\nInnoDB: We intentionally generate a memory trap.\n");\
fprintf(stderr,\
"InnoDB: Send a detailed bug report to mysql@lists.mysql.com\n"\
"InnoDB: If you get repeated assertion failures or crashes, even\n"\
"InnoDB: immediately after the mysqld startup, there may be\n"\
"InnoDB: corruption in the InnoDB tablespace. See section 6.1 of\n"\
"InnoDB: http://www.innodb.com/ibman.php about forcing recovery.\n");\
ut_dbg_stop_threads = TRUE;\
dbg_i = *(ut_dbg_null_ptr);\
if (dbg_i) {\
ut_dbg_null_ptr = NULL;\
}\
}\
if (ut_dbg_stop_threads) {\
fprintf(stderr,\
"InnoDB: Thread %lu stopped in file %s line %lu\n",\
os_thread_pf(os_thread_get_curr_id()), IB__FILE__, (ulint)__LINE__);\
os_thread_sleep(1000000000);\
}\
}
/* This can be used if there are % characters in the assertion formula:
#define ut_a(EXPR) do {\
if we try to printf the formula gcc would complain of illegal print
format characters */
#define ut_anp(EXPR)\
{\
ulint dbg_i;\
\
if (!((ulint)(EXPR) + ut_dbg_zero)) {\
if (!((ulint)(EXPR) + ut_dbg_zero)) {\
ut_print_timestamp(stderr);\
ut_print_timestamp(stderr);\
fprintf(stderr,\
fprintf(stderr, ut_dbg_msg_assert_fail,\
" InnoDB: Assertion failure in thread %lu in file %s line %lu\n",\
os_thread_pf(os_thread_get_curr_id()), __FILE__,\
os_thread_pf(os_thread_get_curr_id()), IB__FILE__,\
(ulint)__LINE__);\
(ulint)__LINE__);\
fprintf(stderr,\
fputs("InnoDB: Failing assertion: " #EXPR "\n", stderr);\
"\nInnoDB: We intentionally generate a memory trap.\n");\
fputs(ut_dbg_msg_trap, stderr);\
fprintf(stderr,\
"InnoDB: Send a detailed bug report to mysql@lists.mysql.com\n"\
"InnoDB: If you get repeated assertion failures or crashes, even\n"\
"InnoDB: immediately after the mysqld startup, there may be\n"\
"InnoDB: corruption in the InnoDB tablespace. See section 6.1 of\n"\
"InnoDB: http://www.innodb.com/ibman.php about forcing recovery.\n");\
ut_dbg_stop_threads = TRUE;\
ut_dbg_stop_threads = TRUE;\
dbg_i = *(ut_dbg_null_ptr);\
if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = NULL;\
if (dbg_i) {\
ut_dbg_null_ptr = NULL;\
}\
}\
}\
if (ut_dbg_stop_threads) {\
if (ut_dbg_stop_threads) {\
fprintf(stderr,\
fprintf(stderr, ut_dbg_msg_stop,\
"InnoDB: Thread %lu stopped in file %s line %lu\n",\
os_thread_pf(os_thread_get_curr_id()), __FILE__, (ulint)__LINE__);\
os_thread_pf(os_thread_get_curr_id()), IB__FILE__, (ulint)__LINE__);\
os_thread_sleep(1000000000);\
os_thread_sleep(1000000000);\
}\
}\
}
}
while (0)
#define ut_error {\
#define ut_error do {\
ulint dbg_i;\
ut_print_timestamp(stderr);\
ut_print_timestamp(stderr);\
fprintf(stderr,\
fprintf(stderr, ut_dbg_msg_assert_fail,\
" InnoDB: Assertion failure in thread %lu in file %s line %lu\n",\
os_thread_pf(os_thread_get_curr_id()), __FILE__, (ulint)__LINE__);\
os_thread_pf(os_thread_get_curr_id()), IB__FILE__, (ulint)__LINE__);\
fprintf(stderr, ut_dbg_msg_trap);\
fprintf(stderr,\
"InnoDB: We intentionally generate a memory trap.\n");\
fprintf(stderr,\
"InnoDB: Send a detailed bug report to mysql@lists.mysql.com\n"\
"InnoDB: If you get repeated assertion failures or crashes, even\n"\
"InnoDB: immediately after the mysqld startup, there may be\n"\
"InnoDB: corruption in the InnoDB tablespace. See section 6.1 of\n"\
"InnoDB: http://www.innodb.com/ibman.php about forcing recovery.\n");\
ut_dbg_stop_threads = TRUE;\
ut_dbg_stop_threads = TRUE;\
dbg_i = *(ut_dbg_null_ptr);\
if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = NULL;\
printf("%lu", dbg_i);\
} while (0)
}
#ifdef UNIV_DEBUG
#ifdef UNIV_DEBUG
#define ut_ad(EXPR) ut_a(EXPR)
#
define ut_ad(EXPR) ut_a(EXPR)
#
define ut_d(EXPR) {EXPR;}
#
define ut_d(EXPR) do {EXPR;} while (0)
#else
#else
#define ut_ad(EXPR)
#
define ut_ad(EXPR)
#define ut_d(EXPR)
#
define ut_d(EXPR)
#endif
#endif
#define UT_NOT_USED(A) A = A
#define UT_NOT_USED(A) A = A
#endif
#endif
innobase/log/log0log.c
View file @
9a817bea
...
@@ -407,7 +407,7 @@ log_pad_current_log_block(void)
...
@@ -407,7 +407,7 @@ log_pad_current_log_block(void)
log_close
();
log_close
();
log_release
();
log_release
();
ut_a
np
((
ut_dulint_get_low
(
lsn
)
%
OS_FILE_LOG_BLOCK_SIZE
)
ut_a
((
ut_dulint_get_low
(
lsn
)
%
OS_FILE_LOG_BLOCK_SIZE
)
==
LOG_BLOCK_HDR_SIZE
);
==
LOG_BLOCK_HDR_SIZE
);
}
}
...
@@ -1117,8 +1117,8 @@ log_group_write_buf(
...
@@ -1117,8 +1117,8 @@ log_group_write_buf(
ulint
i
;
ulint
i
;
ut_ad
(
mutex_own
(
&
(
log_sys
->
mutex
)));
ut_ad
(
mutex_own
(
&
(
log_sys
->
mutex
)));
ut_a
np
(
len
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
ut_a
(
len
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
ut_a
np
(
ut_dulint_get_low
(
start_lsn
)
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
ut_a
(
ut_dulint_get_low
(
start_lsn
)
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
if
(
new_data_offset
==
0
)
{
if
(
new_data_offset
==
0
)
{
write_header
=
TRUE
;
write_header
=
TRUE
;
...
@@ -2190,11 +2190,11 @@ log_group_archive(
...
@@ -2190,11 +2190,11 @@ log_group_archive(
start_lsn
=
log_sys
->
archived_lsn
;
start_lsn
=
log_sys
->
archived_lsn
;
ut_a
np
(
ut_dulint_get_low
(
start_lsn
)
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
ut_a
(
ut_dulint_get_low
(
start_lsn
)
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
end_lsn
=
log_sys
->
next_archived_lsn
;
end_lsn
=
log_sys
->
next_archived_lsn
;
ut_a
np
(
ut_dulint_get_low
(
end_lsn
)
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
ut_a
(
ut_dulint_get_low
(
end_lsn
)
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
buf
=
log_sys
->
archive_buf
;
buf
=
log_sys
->
archive_buf
;
...
@@ -2301,7 +2301,7 @@ loop:
...
@@ -2301,7 +2301,7 @@ loop:
group
->
next_archived_file_no
=
group
->
archived_file_no
+
n_files
;
group
->
next_archived_file_no
=
group
->
archived_file_no
+
n_files
;
group
->
next_archived_offset
=
next_offset
%
group
->
file_size
;
group
->
next_archived_offset
=
next_offset
%
group
->
file_size
;
ut_a
np
(
group
->
next_archived_offset
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
ut_a
(
group
->
next_archived_offset
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
}
}
/*********************************************************
/*********************************************************
...
@@ -2496,8 +2496,7 @@ loop:
...
@@ -2496,8 +2496,7 @@ loop:
start_lsn
=
log_sys
->
archived_lsn
;
start_lsn
=
log_sys
->
archived_lsn
;
if
(
calc_new_limit
)
{
if
(
calc_new_limit
)
{
ut_anp
(
log_sys
->
archive_buf_size
%
OS_FILE_LOG_BLOCK_SIZE
ut_a
(
log_sys
->
archive_buf_size
%
OS_FILE_LOG_BLOCK_SIZE
==
0
);
==
0
);
limit_lsn
=
ut_dulint_add
(
start_lsn
,
limit_lsn
=
ut_dulint_add
(
start_lsn
,
log_sys
->
archive_buf_size
);
log_sys
->
archive_buf_size
);
...
...
innobase/mem/mem0pool.c
View file @
9a817bea
...
@@ -603,7 +603,7 @@ mem_pool_validate(
...
@@ -603,7 +603,7 @@ mem_pool_validate(
}
}
}
}
ut_a
np
(
free
+
pool
->
reserved
==
pool
->
size
ut_a
(
free
+
pool
->
reserved
==
pool
->
size
-
(
pool
->
size
%
MEM_AREA_MIN_SIZE
));
-
(
pool
->
size
%
MEM_AREA_MIN_SIZE
));
mutex_exit
(
&
(
pool
->
mutex
));
mutex_exit
(
&
(
pool
->
mutex
));
...
...
innobase/ut/ut0dbg.c
View file @
9a817bea
...
@@ -18,3 +18,16 @@ ibool ut_dbg_stop_threads = FALSE;
...
@@ -18,3 +18,16 @@ ibool ut_dbg_stop_threads = FALSE;
/* Null pointer used to generate memory trap */
/* Null pointer used to generate memory trap */
ulint
*
ut_dbg_null_ptr
=
NULL
;
ulint
*
ut_dbg_null_ptr
=
NULL
;
const
char
*
ut_dbg_msg_assert_fail
=
"InnoDB: Assertion failure in thread %lu in file %s line %lu
\n
"
;
const
char
*
ut_dbg_msg_trap
=
"InnoDB: We intentionally generate a memory trap.
\n
"
"InnoDB: Send a detailed bug report to mysql@lists.mysql.com.
\n
"
"InnoDB: If you get repeated assertion failures or crashes, even
\n
"
"InnoDB: immediately after the mysqld startup, there may be
\n
"
"InnoDB: corruption in the InnoDB tablespace. See section 6.1 of
\n
"
"InnoDB: http://www.innodb.com/ibman.php about forcing recovery.
\n
"
;
const
char
*
ut_dbg_msg_stop
=
"InnoDB: Thread %lu stopped in file %s line %lu
\n
"
;
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