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
f839b3f3
Commit
f839b3f3
authored
Jun 12, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Merge 1556:1571 from trunk.
parent
4ed9adb5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
54 deletions
+42
-54
handler/ha_innodb.cc
handler/ha_innodb.cc
+16
-17
include/page0page.h
include/page0page.h
+9
-0
include/rem0rec.ic
include/rem0rec.ic
+4
-2
include/row0mysql.h
include/row0mysql.h
+0
-13
page/page0page.c
page/page0page.c
+12
-0
rem/rem0rec.c
rem/rem0rec.c
+1
-1
row/row0mysql.c
row/row0mysql.c
+0
-21
No files found.
handler/ha_innodb.cc
View file @
f839b3f3
...
...
@@ -4558,17 +4558,17 @@ ha_innobase::position(
/*********************************************************************
If it's a DB_TOO_BIG_RECORD error then set a suitable message to
return to the client.*/
static
inline
void
innodb_check_for_record_too_big_error
(
/*==================================*/
dict_table_t
*
table
,
/* in: table to check
*/
int
error
)
/* in: error code to check */
ulint
comp
,
/* in: ROW_FORMAT: nonzero=COMPACT, 0=REDUNDANT
*/
int
error
)
/* in: error code to check */
{
if
(
error
==
(
int
)
DB_TOO_BIG_RECORD
)
{
ulint
max_row_size
;
max_row_size
=
page_get_free_space_of_empty_noninline
(
table
);
max_row_size
=
page_get_free_space_of_empty_noninline
(
comp
);
my_error
(
ER_TOO_BIG_ROWSIZE
,
MYF
(
0
),
max_row_size
);
}
...
...
@@ -4682,9 +4682,8 @@ create_table_def(
error
=
row_create_table_for_mysql
(
table
,
trx
);
/* We need access to the table and so we do the error checking
and set the error message here, before the error translation.*/
innodb_check_for_record_too_big_error
(
table
,
error
);
innodb_check_for_record_too_big_error
(
dict_table_is_comp
(
table
),
error
);
error
=
convert_error_code_to_mysql
(
error
,
NULL
);
...
...
@@ -4808,9 +4807,8 @@ create_index(
sure we don't create too long indexes. */
error
=
row_create_index_for_mysql
(
index
,
trx
,
field_lengths
);
/* We need access to the table and so we do the error checking
and set the error message here, before the error translation.*/
innodb_check_for_record_too_big_error
(
index
->
table
,
error
);
innodb_check_for_record_too_big_error
(
form
->
s
->
row_type
!=
ROW_TYPE_REDUNDANT
,
error
);
error
=
convert_error_code_to_mysql
(
error
,
NULL
);
...
...
@@ -4827,6 +4825,8 @@ int
create_clustered_index_when_no_primary
(
/*===================================*/
trx_t
*
trx
,
/* in: InnoDB transaction handle */
ulint
comp
,
/* in: ROW_FORMAT:
nonzero=COMPACT, 0=REDUNDANT */
const
char
*
table_name
)
/* in: table name */
{
dict_index_t
*
index
;
...
...
@@ -4835,14 +4835,12 @@ create_clustered_index_when_no_primary(
/* We pass 0 as the space id, and determine at a lower level the space
id where to store the table */
index
=
dict_mem_index_create
(
(
char
*
)
table_name
,
(
char
*
)
"GEN_CLUST_INDEX"
,
0
,
DICT_CLUSTERED
,
0
);
index
=
dict_mem_index_create
(
table_name
,
"GEN_CLUST_INDEX"
,
0
,
DICT_CLUSTERED
,
0
);
error
=
row_create_index_for_mysql
(
index
,
trx
,
NULL
);
/* We need access to the table and so we do the error checking
and set the error message here, before the error translation.*/
innodb_check_for_record_too_big_error
(
index
->
table
,
error
);
innodb_check_for_record_too_big_error
(
comp
,
error
);
error
=
convert_error_code_to_mysql
(
error
,
NULL
);
...
...
@@ -4979,8 +4977,9 @@ ha_innobase::create(
order the rows by their row id which is internally generated
by InnoDB */
error
=
create_clustered_index_when_no_primary
(
trx
,
norm_name
);
error
=
create_clustered_index_when_no_primary
(
trx
,
form
->
s
->
row_type
!=
ROW_TYPE_REDUNDANT
,
norm_name
);
if
(
error
)
{
goto
cleanup
;
}
...
...
include/page0page.h
View file @
f839b3f3
...
...
@@ -604,6 +604,15 @@ page_get_free_space_of_empty(
/* out: free space */
ulint
comp
)
/* in: nonzero=compact page format */
__attribute__
((
const
));
/*****************************************************************
Calculates free space if a page is emptied. */
ulint
page_get_free_space_of_empty_noninline
(
/*===================================*/
/* out: free space */
ulint
comp
)
/* in: nonzero=compact page format */
__attribute__
((
const
));
/**************************************************************
Returns the base extra size of a physical record. This is the
size of the fixed header, independent of the record size. */
...
...
include/rem0rec.ic
View file @
f839b3f3
...
...
@@ -889,7 +889,8 @@ UNIV_INLINE
void
rec_offs_set_n_alloc(
/*=================*/
ulint* offsets, /* in: array for rec_get_offsets() */
ulint* offsets, /* out: array for rec_get_offsets(),
must be allocated */
ulint n_alloc) /* in: number of elements */
{
ut_ad(offsets);
...
...
@@ -1374,7 +1375,8 @@ UNIV_INLINE
void
rec_offs_set_n_fields(
/*==================*/
ulint* offsets, /* in: array returned by rec_get_offsets() */
ulint* offsets, /* in/out: array returned by
rec_get_offsets() */
ulint n_fields) /* in: number of fields */
{
ut_ad(offsets);
...
...
include/row0mysql.h
View file @
f839b3f3
...
...
@@ -554,19 +554,6 @@ row_undo_report_drop_table_dict_operation(
/* out: DB_SUCCESS or error code */
trx_t
*
trx
,
/* in: query thread */
const
char
*
table_name
);
/* in: table name dropped */
/*************************************************************************
Get the min of the maximum possible row sizes. */
ulint
page_get_free_space_of_empty_noninline
(
/*===================================*/
/* out: The (approx) maximum size
of a row, this is a conservative
estimate, since the size can be
slightly larger depending upon
the ROW_FORMAT setting.*/
dict_table_t
*
table
);
/* in: table for which max record
size required.*/
/* A struct describing a place for an individual column in the MySQL
row format which is presented to the table handler in ha_innobase.
...
...
page/page0page.c
View file @
f839b3f3
...
...
@@ -216,6 +216,18 @@ page_set_max_trx_id(
}
}
/*****************************************************************
Calculates free space if a page is emptied. */
ulint
page_get_free_space_of_empty_noninline
(
/*===================================*/
/* out: free space */
ulint
comp
)
/* in: nonzero=compact page format */
{
return
(
page_get_free_space_of_empty
(
comp
));
}
/****************************************************************
Allocates a block of memory from the heap of an index page. */
...
...
rem/rem0rec.c
View file @
f839b3f3
...
...
@@ -478,7 +478,7 @@ rec_get_offsets_func(
/* out: the new offsets */
const
rec_t
*
rec
,
/* in: physical record */
dict_index_t
*
index
,
/* in: record descriptor */
ulint
*
offsets
,
/* in: array consisting of offsets[0]
ulint
*
offsets
,
/* in
/out
: array consisting of offsets[0]
allocated elements, or an array from
rec_get_offsets(), or NULL */
ulint
n_fields
,
/* in: maximum number of initialized fields
...
...
row/row0mysql.c
View file @
f839b3f3
...
...
@@ -4460,24 +4460,3 @@ row_create_index_graph_for_mysql(
return
(
err
);
}
#endif
/* !UNIV_HOTBACKUP */
/*************************************************************************
Get the maximum row size. */
ulint
page_get_free_space_of_empty_noninline
(
/*===================================*/
/* out: The (approx) maximum size
of a row, this is a conservative
estimate, since the size can be
slightly larger depending upon
the ROW_FORMAT setting.*/
dict_table_t
*
table
)
/* in: table for which max record
size is required.*/
{
ibool
compact
;
compact
=
dict_table_is_comp
(
table
);
return
(
page_get_free_space_of_empty
(
compact
)
/
2
);
}
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