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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
31a49c3f
Commit
31a49c3f
authored
Apr 14, 2005
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge hundin.mysql.fi:/home/heikki/mysql-4.1
into hundin.mysql.fi:/home/heikki/mysql-5.0
parents
e461c796
a1f7f57b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
21 deletions
+55
-21
innobase/fil/fil0fil.c
innobase/fil/fil0fil.c
+51
-19
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+2
-2
ndb/src/ndbapi/ndberror.c
ndb/src/ndbapi/ndberror.c
+2
-0
No files found.
innobase/fil/fil0fil.c
View file @
31a49c3f
...
...
@@ -2935,6 +2935,44 @@ fil_load_single_table_tablespace(
mem_free
(
filepath
);
}
/***************************************************************************
A fault-tolerant function that tries to read the next file name in the
directory. We retry 100 times if os_file_readdir_next_file() returns -1. The
idea is to read as much good data as we can and jump over bad data. */
static
int
fil_file_readdir_next_file
(
/*=======================*/
/* out: 0 if ok, -1 if error even after the
retries, 1 if at the end of the directory */
ulint
*
err
,
/* out: this is set to DB_ERROR if an error
was encountered, otherwise not changed */
const
char
*
dirname
,
/* in: directory name or path */
os_file_dir_t
dir
,
/* in: directory stream */
os_file_stat_t
*
info
)
/* in/out: buffer where the info is returned */
{
ulint
i
;
int
ret
;
for
(
i
=
0
;
i
<
100
;
i
++
)
{
ret
=
os_file_readdir_next_file
(
dirname
,
dir
,
info
);
if
(
ret
!=
-
1
)
{
return
(
ret
);
}
fprintf
(
stderr
,
"InnoDB: Error: os_file_readdir_next_file() returned -1 in
\n
"
"InnoDB: directory %s
\n
"
"InnoDB: Crash recovery may have failed for some .ibd files!
\n
"
,
dirname
);
*
err
=
DB_ERROR
;
}
return
(
-
1
);
}
/************************************************************************
At the server startup, if we need crash recovery, scans the database
directories under the MySQL datadir, looking for .ibd files. Those files are
...
...
@@ -2955,6 +2993,7 @@ fil_load_single_table_tablespaces(void)
os_file_dir_t
dbdir
;
os_file_stat_t
dbinfo
;
os_file_stat_t
fileinfo
;
ulint
err
=
DB_SUCCESS
;
/* The datadir of MySQL is always the default directory of mysqld */
...
...
@@ -2970,7 +3009,7 @@ fil_load_single_table_tablespaces(void)
/* Scan all directories under the datadir. They are the database
directories of MySQL. */
ret
=
os_file_readdir_next_file
(
fil_path_to_mysql_datadir
,
dir
,
ret
=
fil_file_readdir_next_file
(
&
err
,
fil_path_to_mysql_datadir
,
dir
,
&
dbinfo
);
while
(
ret
==
0
)
{
ulint
len
;
...
...
@@ -3008,7 +3047,7 @@ fil_load_single_table_tablespaces(void)
/* We found a database directory; loop through it,
looking for possible .ibd files in it */
ret
=
os_file_readdir_next_file
(
dbpath
,
dbdir
,
ret
=
fil_file_readdir_next_file
(
&
err
,
dbpath
,
dbdir
,
&
fileinfo
);
while
(
ret
==
0
)
{
/* printf(
...
...
@@ -3030,36 +3069,29 @@ fil_load_single_table_tablespaces(void)
dbinfo
.
name
,
fileinfo
.
name
);
}
next_file_item:
ret
=
os_file_readdir_next_file
(
dbpath
,
dbdir
,
ret
=
fil_file_readdir_next_file
(
&
err
,
dbpath
,
dbdir
,
&
fileinfo
);
}
if
(
0
!=
os_file_closedir
(
dbdir
))
{
fputs
(
fputs
(
"InnoDB: Warning: could not close database directory "
,
stderr
);
ut_print_filename
(
stderr
,
dbpath
);
putc
(
'\n'
,
stderr
);
ut_print_filename
(
stderr
,
dbpath
);
putc
(
'\n'
,
stderr
);
err
=
DB_ERROR
;
}
}
next_datadir_item:
ret
=
os_file_readdir_next_file
(
fil_path_to_mysql_datadir
,
ret
=
fil_file_readdir_next_file
(
&
err
,
fil_path_to_mysql_datadir
,
dir
,
&
dbinfo
);
}
mem_free
(
dbpath
);
/* At the end of directory we should get 1 as the return value, -1
if there was an error */
if
(
ret
!=
1
)
{
fprintf
(
stderr
,
"InnoDB: Error: os_file_readdir_next_file returned %d in MySQL datadir
\n
"
,
ret
);
os_file_closedir
(
dir
);
return
(
DB_ERROR
);
}
if
(
0
!=
os_file_closedir
(
dir
))
{
fprintf
(
stderr
,
"InnoDB: Error: could not close MySQL datadir
\n
"
);
...
...
@@ -3067,7 +3099,7 @@ fil_load_single_table_tablespaces(void)
return
(
DB_ERROR
);
}
return
(
DB_SUCCESS
);
return
(
err
);
}
/************************************************************************
...
...
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
31a49c3f
...
...
@@ -7520,13 +7520,13 @@ void Dblqh::execSCAN_FRAGREQ(Signal* signal)
ndbrequire
(
max_rows
>
0
&&
max_rows
<=
MAX_PARALLEL_OP_PER_SCAN
);
if
(
!
getFragmentrec
(
signal
,
fragId
))
{
errorCode
=
__LINE__
;
errorCode
=
1231
;
goto
error_handler
;
}
//if
// Verify scan type vs table type (both sides are boolean)
if
(
rangeScan
!=
DictTabInfo
::
isOrderedIndex
(
fragptr
.
p
->
tableType
))
{
errorCode
=
__LINE__
;
// XXX fix
errorCode
=
1232
;
goto
error_handler
;
}
//if
...
...
ndb/src/ndbapi/ndberror.c
View file @
31a49c3f
...
...
@@ -356,6 +356,8 @@ ErrorBundle ErrorCodes[] = {
{
1226
,
SE
,
"Table is being dropped"
},
{
1228
,
SE
,
"Cannot use drop table for drop index"
},
{
1229
,
SE
,
"Too long frm data supplied"
},
{
1231
,
SE
,
"Invalid table or index to scan"
},
{
1232
,
SE
,
"Invalid table or index to scan"
},
/**
* FunctionNotImplemented
...
...
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