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
b04675c8
Commit
b04675c8
authored
Jan 21, 2005
by
timour@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-dbg
parents
e19c6a85
d1d68b14
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
25 deletions
+85
-25
innobase/dict/dict0crea.c
innobase/dict/dict0crea.c
+11
-0
innobase/dict/dict0dict.c
innobase/dict/dict0dict.c
+6
-2
innobase/dict/dict0load.c
innobase/dict/dict0load.c
+17
-0
innobase/fil/fil0fil.c
innobase/fil/fil0fil.c
+51
-23
No files found.
innobase/dict/dict0crea.c
View file @
b04675c8
...
...
@@ -81,6 +81,17 @@ dict_create_sys_tables_tuple(
dfield_set_data
(
dfield
,
ptr
,
8
);
/* 7: MIX_LEN --------------------------*/
/* Track corruption reported on mailing list Jan 14, 2005 */
if
(
table
->
mix_len
!=
0
&&
table
->
mix_len
!=
0x80000000
)
{
fprintf
(
stderr
,
"InnoDB: Error: mix_len is %lu in table %s
\n
"
,
(
ulong
)
table
->
mix_len
,
table
->
name
);
mem_analyze_corruption
((
byte
*
)
&
(
table
->
mix_len
));
ut_error
;
}
dfield
=
dtuple_get_nth_field
(
entry
,
5
);
ptr
=
mem_heap_alloc
(
heap
,
4
);
...
...
innobase/dict/dict0dict.c
View file @
b04675c8
...
...
@@ -2920,9 +2920,9 @@ loop:
constraint_name
=
NULL
;
if
(
ptr1
<
ptr2
)
{
/* The user
has
specified a constraint name. Pick it so
/* The user
may have
specified a constraint name. Pick it so
that we can store 'databasename/constraintname' as the id of
the id
of the constraint to system tables. */
of the constraint to system tables. */
ptr
=
ptr1
;
ptr
=
dict_accept
(
ptr
,
"CONSTRAINT"
,
&
success
);
...
...
@@ -2959,6 +2959,10 @@ loop:
ptr
=
dict_accept
(
ptr
,
"FOREIGN"
,
&
success
);
if
(
!
success
)
{
goto
loop
;
}
if
(
!
isspace
(
*
ptr
))
{
goto
loop
;
}
...
...
innobase/dict/dict0load.c
View file @
b04675c8
...
...
@@ -728,6 +728,7 @@ dict_load_table(
ulint
space
;
ulint
n_cols
;
ulint
err
;
ulint
mix_len
;
mtr_t
mtr
;
#ifdef UNIV_SYNC_DEBUG
...
...
@@ -775,6 +776,22 @@ dict_load_table(
return
(
NULL
);
}
/* Track a corruption bug reported on the MySQL mailing list Jan 14,
2005: mix_len had a value different from 0 */
field
=
rec_get_nth_field
(
rec
,
7
,
&
len
);
ut_a
(
len
==
4
);
mix_len
=
mach_read_from_4
(
field
);
if
(
mix_len
!=
0
&&
mix_len
!=
0x80000000
)
{
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: table %s has a nonsensical mix len %lu
\n
"
,
name
,
(
ulong
)
mix_len
);
}
#if MYSQL_VERSION_ID < 50003
/* Starting from MySQL 5.0.3, the high-order bit of MIX_LEN is the
"compact format" flag. */
...
...
innobase/fil/fil0fil.c
View file @
b04675c8
...
...
@@ -480,28 +480,33 @@ fil_node_open_file(
ut_a
(
node
->
n_pending
==
0
);
ut_a
(
node
->
open
==
FALSE
);
/* printf("Opening file %s\n", node->name); */
if
(
node
->
size
==
0
)
{
/* It must be a single-table tablespace and we do not know the
size of the file yet. First we open the file in the normal
mode, no async I/O here, for simplicity. Then do some checks,
and close the file again.
NOTE that we could not use the simple file read function
os_file_read() in Windows to read from a file opened for
async I/O! */
node
->
handle
=
os_file_create_simple_no_error_handling
(
node
->
name
,
OS_FILE_OPEN
,
OS_FILE_READ_ONLY
,
&
success
);
if
(
!
success
)
{
/* The following call prints an error message */
os_file_get_last_error
(
TRUE
);
if
(
space
->
purpose
==
FIL_LOG
)
{
node
->
handle
=
os_file_create
(
node
->
name
,
OS_FILE_OPEN
,
OS_FILE_AIO
,
OS_LOG_FILE
,
&
ret
);
}
else
if
(
node
->
is_raw_disk
)
{
node
->
handle
=
os_file_create
(
node
->
name
,
OS_FILE_OPEN_RAW
,
OS_FILE_AIO
,
OS_DATA_FILE
,
&
ret
);
}
else
{
node
->
handle
=
os_file_create
(
node
->
name
,
OS_FILE_OPEN
,
OS_FILE_AIO
,
OS_DATA_FILE
,
&
ret
);
}
ut_a
(
ret
);
node
->
open
=
TRUE
;
ut_print_timestamp
(
stderr
);
system
->
n_open
++
;
fprintf
(
stderr
,
" InnoDB: Fatal error: cannot open %s
\n
."
"InnoDB: Have you deleted .ibd files under a running mysqld server?
\n
"
,
node
->
name
);
ut_a
(
0
);
}
if
(
node
->
size
==
0
)
{
ut_a
(
space
->
purpose
!=
FIL_LOG
);
ut_a
(
space
->
id
!=
0
);
os_file_get_size
(
node
->
handle
,
&
size_low
,
&
size_high
);
...
...
@@ -511,11 +516,6 @@ fil_node_open_file(
node
->
size
=
(
ulint
)
(
size_bytes
/
UNIV_PAGE_SIZE
);
#else
/* It must be a single-table tablespace and we do not know the
size of the file yet */
ut_a
(
space
->
id
!=
0
);
if
(
size_bytes
<
FIL_IBD_FILE_INITIAL_SIZE
*
UNIV_PAGE_SIZE
)
{
fprintf
(
stderr
,
"InnoDB: Error: the size of single-table tablespace file %s
\n
"
...
...
@@ -539,6 +539,10 @@ fil_node_open_file(
ut_free
(
buf2
);
/* Close the file now that we have read the space id from it */
os_file_close
(
node
->
handle
);
if
(
space_id
==
ULINT_UNDEFINED
||
space_id
==
0
)
{
fprintf
(
stderr
,
"InnoDB: Error: tablespace id %lu in file %s is not sensible
\n
"
,
...
...
@@ -566,6 +570,30 @@ fil_node_open_file(
space
->
size
+=
node
->
size
;
}
/* printf("Opening file %s\n", node->name); */
/* Open the file for reading and writing, in Windows normally in the
unbuffered async I/O mode, though global variables may make
os_file_create() to fall back to the normal file I/O mode. */
if
(
space
->
purpose
==
FIL_LOG
)
{
node
->
handle
=
os_file_create
(
node
->
name
,
OS_FILE_OPEN
,
OS_FILE_AIO
,
OS_LOG_FILE
,
&
ret
);
}
else
if
(
node
->
is_raw_disk
)
{
node
->
handle
=
os_file_create
(
node
->
name
,
OS_FILE_OPEN_RAW
,
OS_FILE_AIO
,
OS_DATA_FILE
,
&
ret
);
}
else
{
node
->
handle
=
os_file_create
(
node
->
name
,
OS_FILE_OPEN
,
OS_FILE_AIO
,
OS_DATA_FILE
,
&
ret
);
}
ut_a
(
ret
);
node
->
open
=
TRUE
;
system
->
n_open
++
;
if
(
space
->
purpose
==
FIL_TABLESPACE
&&
space
->
id
!=
0
)
{
/* Put the node to the LRU list */
UT_LIST_ADD_FIRST
(
LRU
,
system
->
LRU
,
node
);
...
...
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