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
802a5abf
Commit
802a5abf
authored
Dec 03, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/jonas/src/mysql-5.0
parents
b9f11584
2db2cda3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
10 deletions
+51
-10
innobase/btr/btr0btr.c
innobase/btr/btr0btr.c
+3
-2
innobase/include/data0type.ic
innobase/include/data0type.ic
+18
-1
innobase/row/row0ins.c
innobase/row/row0ins.c
+9
-7
innobase/row/row0sel.c
innobase/row/row0sel.c
+2
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+19
-0
No files found.
innobase/btr/btr0btr.c
View file @
802a5abf
...
...
@@ -2515,6 +2515,7 @@ btr_index_rec_validate(
for
(
i
=
0
;
i
<
n
;
i
++
)
{
dtype_t
*
type
=
dict_index_get_nth_type
(
index
,
i
);
ulint
fixed_size
=
dtype_get_fixed_size
(
type
);
rec_get_nth_field
(
rec
,
offsets
,
i
,
&
len
);
...
...
@@ -2522,8 +2523,8 @@ btr_index_rec_validate(
their type is CHAR. */
if
((
dict_index_get_nth_field
(
index
,
i
)
->
prefix_len
==
0
&&
len
!=
UNIV_SQL_NULL
&&
dtype_is_fixed_size
(
type
)
&&
len
!=
dtype_get_fixed_size
(
type
)
)
&&
len
!=
UNIV_SQL_NULL
&&
fixed_size
&&
len
!=
fixed_size
)
||
(
dict_index_get_nth_field
(
index
,
i
)
->
prefix_len
>
0
&&
len
!=
UNIV_SQL_NULL
...
...
innobase/include/data0type.ic
View file @
802a5abf
...
...
@@ -8,6 +8,17 @@ Created 1/16/1996 Heikki Tuuri
#include "mach0data.h"
/**********************************************************************
Determines whether the given character set is of variable length.
NOTE: the prototype of this function is copied from ha_innodb.cc! If you change
this function, you MUST change also the prototype here! */
extern
ibool
innobase_is_mb_cset(
/*================*/
ulint cset); /* in: MySQL charset-collation code */
/*************************************************************************
Sets a data type structure. */
UNIV_INLINE
...
...
@@ -293,7 +304,13 @@ dtype_get_fixed_size(
case DATA_FLOAT:
case DATA_DOUBLE:
case DATA_MYSQL:
return(dtype_get_len(type));
if ((type->prtype & DATA_BINARY_TYPE)
|| !innobase_is_mb_cset(
dtype_get_charset_coll(
type->prtype))) {
return(dtype_get_len(type));
}
/* fall through for variable-length charsets */
case DATA_VARCHAR:
case DATA_BINARY:
case DATA_DECIMAL:
...
...
innobase/row/row0ins.c
View file @
802a5abf
...
...
@@ -473,6 +473,8 @@ row_ins_cascade_calc_update_vec(
if
(
parent_ufield
->
field_no
==
parent_field_no
)
{
ulint
fixed_size
;
/* A field in the parent index record is
updated. Let us make the update vector
field for the child table. */
...
...
@@ -512,22 +514,22 @@ row_ins_cascade_calc_update_vec(
need to pad with spaces the new value of the
child column */
if
(
dtype_is_fixed_size
(
type
)
fixed_size
=
dtype_get_fixed_size
(
type
);
if
(
fixed_size
&&
ufield
->
new_val
.
len
!=
UNIV_SQL_NULL
&&
ufield
->
new_val
.
len
<
dtype_get_fixed_size
(
type
))
{
&&
ufield
->
new_val
.
len
<
fixed_size
)
{
ufield
->
new_val
.
data
=
mem_heap_alloc
(
heap
,
dtype_get_fixed_size
(
type
));
ufield
->
new_val
.
len
=
dtype_get_fixed_size
(
type
);
fixed_size
);
ufield
->
new_val
.
len
=
fixed_size
;
ut_a
(
dtype_get_pad_char
(
type
)
!=
ULINT_UNDEFINED
);
memset
(
ufield
->
new_val
.
data
,
(
byte
)
dtype_get_pad_char
(
type
),
dtype_get_fixed_size
(
type
)
);
fixed_size
);
ut_memcpy
(
ufield
->
new_val
.
data
,
parent_ufield
->
new_val
.
data
,
parent_ufield
->
new_val
.
len
);
...
...
innobase/row/row0sel.c
View file @
802a5abf
...
...
@@ -3694,6 +3694,8 @@ rec_loop:
}
if
(
prebuilt
->
clust_index_was_generated
)
{
offsets
=
rec_reget_offsets
(
index_rec
,
index
,
offsets
,
ULINT_UNDEFINED
,
heap
);
row_sel_store_row_id_to_prebuilt
(
prebuilt
,
index_rec
,
index
,
offsets
);
}
...
...
sql/ha_innodb.cc
View file @
802a5abf
...
...
@@ -520,6 +520,25 @@ innobase_mysql_print_thd(
putc
(
'\n'
,
f
);
}
/**********************************************************************
Determines whether the given character set is of variable length.
NOTE that the exact prototype of this function has to be in
/innobase/data/data0type.ic! */
extern
"C"
ibool
innobase_is_mb_cset
(
/*================*/
ulint
cset
)
/* in: MySQL charset-collation code */
{
CHARSET_INFO
*
cs
;
ut_ad
(
cset
<
256
);
cs
=
all_charsets
[
cset
];
return
(
cs
&&
cs
->
mbminlen
!=
cs
->
mbmaxlen
);
}
/**********************************************************************
Compares NUL-terminated UTF-8 strings case insensitively.
...
...
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