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
bcd7f9a9
Commit
bcd7f9a9
authored
Nov 18, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
f30ce1ec
22577e87
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
49 additions
and
11 deletions
+49
-11
client/Makefile.am
client/Makefile.am
+1
-0
innobase/fil/fil0fil.c
innobase/fil/fil0fil.c
+16
-3
innobase/include/fil0fil.h
innobase/include/fil0fil.h
+1
-1
ndb/include/Makefile.am
ndb/include/Makefile.am
+1
-0
ndb/src/mgmclient/CommandInterpreter.cpp
ndb/src/mgmclient/CommandInterpreter.cpp
+6
-1
ndb/tools/Makefile.am
ndb/tools/Makefile.am
+1
-1
ndb/tools/restore/restore_main.cpp
ndb/tools/restore/restore_main.cpp
+4
-2
tests/client_test.c
tests/client_test.c
+19
-3
No files found.
client/Makefile.am
View file @
bcd7f9a9
...
...
@@ -27,6 +27,7 @@ bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \
mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen
noinst_HEADERS
=
sql_string.h completion_hash.h my_readline.h
\
client_priv.h
mysqladmin_SOURCES
=
mysqladmin.cc
mysql_SOURCES
=
mysql.cc readline.cc sql_string.cc completion_hash.cc
mysqladmin_SOURCES
=
mysqladmin.cc
mysql_LDADD
=
@readline_link@ @TERMCAP_LIB@
$(LDADD)
$(CXXLDFLAGS)
...
...
innobase/fil/fil0fil.c
View file @
bcd7f9a9
...
...
@@ -106,7 +106,7 @@ struct fil_node_struct {
device or a raw disk partition */
ulint
size
;
/* size of the file in database pages, 0 if
not known yet; the possible last incomplete
megabyte
is
ignored if space == 0 */
megabyte
may be
ignored if space == 0 */
ulint
n_pending
;
/* count of pending i/o's on this file;
closing of the file is not allowed if
...
...
@@ -160,7 +160,9 @@ struct fil_space_struct {
UT_LIST_BASE_NODE_T
(
fil_node_t
)
chain
;
/* base node for the file chain */
ulint
size
;
/* space size in pages; 0 if a single-table
tablespace whose size we do not know yet */
tablespace whose size we do not know yet;
last incomplete megabytes in data files may be
ignored if space == 0 */
ulint
n_reserved_extents
;
/* number of reserved free extents for
ongoing operations like B-tree page split */
...
...
@@ -3255,7 +3257,7 @@ fil_extend_space_to_desired_size(
ulint
*
actual_size
,
/* out: size of the space after extension;
if we ran out of disk space this may be lower
than the desired size */
ulint
space_id
,
/* in: space id
, must be != 0
*/
ulint
space_id
,
/* in: space id */
ulint
size_after_extend
)
/* in: desired size in pages after the
extension; if the current space size is bigger
than this already, the function does nothing */
...
...
@@ -3352,6 +3354,17 @@ fil_extend_space_to_desired_size(
fil_node_complete_io
(
node
,
system
,
OS_FILE_WRITE
);
*
actual_size
=
space
->
size
;
if
(
space_id
==
0
)
{
ulint
pages_per_mb
=
(
1024
*
1024
)
/
UNIV_PAGE_SIZE
;
/* Keep the last data file size info up to date, rounded to
full megabytes */
srv_data_file_sizes
[
srv_n_data_files
-
1
]
=
(
node
->
size
/
pages_per_mb
)
*
pages_per_mb
;
}
/*
printf("Extended %s to %lu, actual size %lu pages\n", space->name,
size_after_extend, *actual_size); */
...
...
innobase/include/fil0fil.h
View file @
bcd7f9a9
...
...
@@ -478,7 +478,7 @@ fil_extend_space_to_desired_size(
ulint
*
actual_size
,
/* out: size of the space after extension;
if we ran out of disk space this may be lower
than the desired size */
ulint
space_id
,
/* in: space id
, must be != 0
*/
ulint
space_id
,
/* in: space id */
ulint
size_after_extend
);
/* in: desired size in pages after the
extension; if the current space size is bigger
than this already, the function does nothing */
...
...
ndb/include/Makefile.am
View file @
bcd7f9a9
...
...
@@ -28,6 +28,7 @@ ndbapi/NdbIndexScanOperation.hpp \
ndbapi/ndberror.h
mgmapiinclude_HEADERS
=
\
mgmapi/LocalConfig.hpp
\
mgmapi/mgmapi.h
\
mgmapi/mgmapi_debug.h
...
...
ndb/src/mgmclient/CommandInterpreter.cpp
View file @
bcd7f9a9
...
...
@@ -1374,7 +1374,7 @@ void
CommandInterpreter
::
executeDumpState
(
int
processId
,
const
char
*
parameters
,
bool
all
)
{
if
(
parameters
==
0
||
strlen
(
parameters
)
==
0
){
if
(
emptyString
(
parameters
)
){
ndbout
<<
"Expected argument"
<<
endl
;
return
;
}
...
...
@@ -1794,6 +1794,10 @@ CommandInterpreter::executeEventReporting(int processId,
const
char
*
parameters
,
bool
all
)
{
if
(
emptyString
(
parameters
))
{
ndbout
<<
"Expected argument"
<<
endl
;
return
;
}
connect
();
BaseString
tmp
(
parameters
);
...
...
@@ -1894,6 +1898,7 @@ void
CommandInterpreter
::
executeAbortBackup
(
char
*
parameters
)
{
connect
();
strtok
(
parameters
,
" "
);
struct
ndb_mgm_reply
reply
;
char
*
id
=
strtok
(
NULL
,
"
\0
"
);
...
...
ndb/tools/Makefile.am
View file @
bcd7f9a9
...
...
@@ -26,7 +26,7 @@ ndb_select_all_SOURCES = select_all.cpp \
../test/src/NDBT_ResultRow.cpp
\
$(tools_common_sources)
ndb_select_count_SOURCES
=
select_count.cpp
$(tools_common_sources)
ndb_restore_SOURCES
=
restore/main.cpp
\
ndb_restore_SOURCES
=
restore/
restore_
main.cpp
\
restore/consumer.cpp
\
restore/consumer_restore.cpp
\
restore/consumer_printer.cpp
\
...
...
ndb/tools/restore/main.cpp
→
ndb/tools/restore/
restore_
main.cpp
View file @
bcd7f9a9
...
...
@@ -123,15 +123,17 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case
'n'
:
if
(
ga_nodeId
==
0
)
{
printf
(
"Error in --nodeid
|
-n setting, see --help
\n
"
);
printf
(
"Error in --nodeid
,
-n setting, see --help
\n
"
);
exit
(
1
);
}
break
;
case
'b'
:
if
(
ga_backupId
==
0
)
{
printf
(
"Error in --backupid
|
-b setting, see --help
\n
"
);
printf
(
"Error in --backupid
,
-b setting, see --help
\n
"
);
exit
(
1
);
}
break
;
case
'?'
:
usage
();
exit
(
0
);
...
...
tests/client_test.c
View file @
bcd7f9a9
...
...
@@ -635,12 +635,15 @@ static void verify_prepare_field(MYSQL_RES *result,
unsigned
long
length
,
const
char
*
def
)
{
MYSQL_FIELD
*
field
;
CHARSET_INFO
*
cs
;
if
(
!
(
field
=
mysql_fetch_field_direct
(
result
,
no
)))
{
fprintf
(
stdout
,
"
\n
*** ERROR: FAILED TO GET THE RESULT ***"
);
exit
(
1
);
}
cs
=
get_charset
(
field
->
charsetnr
,
0
);
DIE_UNLESS
(
cs
);
if
(
!
opt_silent
)
{
fprintf
(
stdout
,
"
\n
field[%d]:"
,
no
);
...
...
@@ -654,7 +657,7 @@ static void verify_prepare_field(MYSQL_RES *result,
field
->
org_table
,
org_table
);
fprintf
(
stdout
,
"
\n
database :`%s`
\t
(expected: `%s`)"
,
field
->
db
,
db
);
fprintf
(
stdout
,
"
\n
length :`%ld`
\t
(expected: `%ld`)"
,
field
->
length
,
length
);
field
->
length
,
length
*
cs
->
mbmaxlen
);
fprintf
(
stdout
,
"
\n
maxlength:`%ld`"
,
field
->
max_length
);
fprintf
(
stdout
,
"
\n
charsetnr:`%d`"
,
field
->
charsetnr
);
fprintf
(
stdout
,
"
\n
default :`%s`
\t
(expected: `%s`)"
,
...
...
@@ -663,11 +666,24 @@ static void verify_prepare_field(MYSQL_RES *result,
}
DIE_UNLESS
(
strcmp
(
field
->
name
,
name
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
org_name
,
org_name
)
==
0
);
DIE_UNLESS
(
field
->
type
==
type
);
/*
XXX: silent column specification change works based on number of
bytes a column occupies. So CHAR -> VARCHAR upgrade is possible even
for CHAR(2) column if its character set is multibyte.
VARCHAR -> CHAR downgrade won't work for VARCHAR(3) as one would
expect.
*/
if
(
cs
->
mbmaxlen
==
1
)
DIE_UNLESS
(
field
->
type
==
type
);
DIE_UNLESS
(
strcmp
(
field
->
table
,
table
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
org_table
,
org_table
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
db
,
db
)
==
0
);
DIE_UNLESS
(
field
->
length
==
length
);
/*
Character set should be taken into account for multibyte encodings, such
as utf8. Field length is calculated as number of characters * maximum
number of bytes a character can occupy.
*/
DIE_UNLESS
(
field
->
length
==
length
*
cs
->
mbmaxlen
);
if
(
def
)
DIE_UNLESS
(
strcmp
(
field
->
def
,
def
)
==
0
);
}
...
...
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