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
95ffe2d0
Commit
95ffe2d0
authored
Jun 15, 2003
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handler.h, ha_innodb.h, ha_innodb.cc:
Cleanup; remove compiler warning on Windows
parent
d2ea62cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
13 deletions
+19
-13
sql/ha_innodb.cc
sql/ha_innodb.cc
+15
-11
sql/ha_innodb.h
sql/ha_innodb.h
+2
-1
sql/handler.h
sql/handler.h
+2
-1
No files found.
sql/ha_innodb.cc
View file @
95ffe2d0
...
...
@@ -43,7 +43,9 @@ InnoDB */
pthread_mutex_t
innobase_mutex
;
/* Store MySQL definition of 'byte': in Linux it is char while InnoDB
uses unsigned char */
uses unsigned char; the header univ.i which we include next defines
'byte' as a macro which expands to 'unsigned char' */
typedef
byte
mysql_byte
;
#define INSIDE_HA_INNOBASE_CC
...
...
@@ -1716,8 +1718,7 @@ get_innobase_type_from_mysql_type(
}
/***********************************************************************
Stores a key value for a row to a buffer. This must currently only be used
to store a row reference to the 'ref' buffer of this table handle! */
Stores a key value for a row to a buffer. */
uint
ha_innobase
::
store_key_val_for_row
(
...
...
@@ -1725,8 +1726,8 @@ ha_innobase::store_key_val_for_row(
/* out: key value length as stored in buff */
uint
keynr
,
/* in: key number */
char
*
buff
,
/* in/out: buffer for the key value (in MySQL
format)
; currently this MUST be the 'ref'
buffer!
*/
format)
*/
uint
buff_len
,
/* in: buffer length
*/
const
mysql_byte
*
record
)
/* in: row in MySQL format */
{
KEY
*
key_info
=
table
->
key_info
+
keynr
;
...
...
@@ -1757,11 +1758,11 @@ ha_innobase::store_key_val_for_row(
for data. For a VARCHAR(n) the max field length is n. If the stored
value is the SQL NULL then these data bytes are set to 0. */
/* We have to zero-fill the
'ref' buffer so that MySQL is able to
use a simple memcmp to compare two key values to determine if they
are equal
*/
/* We have to zero-fill the
buffer so that MySQL is able to use a
simple memcmp to compare two key values to determine if they are
equal. MySQL does this to compare contents of two 'ref' values.
*/
bzero
(
buff
,
ref_length
);
bzero
(
buff
,
buff_len
);
for
(;
key_part
!=
end
;
key_part
++
)
{
is_null
=
FALSE
;
...
...
@@ -1808,7 +1809,7 @@ ha_innobase::store_key_val_for_row(
storage of the number is little-endian */
ut_a
(
blob_len
<
256
);
*
buff
=
blob_len
;
*
((
byte
*
)
buff
)
=
(
byte
)
blob_len
;
buff
+=
2
;
memcpy
(
buff
,
blob_data
,
blob_len
);
...
...
@@ -1826,6 +1827,8 @@ ha_innobase::store_key_val_for_row(
}
}
ut_a
(
buff
<=
buff_start
+
buff_len
);
DBUG_RETURN
((
uint
)(
buff
-
buff_start
));
}
...
...
@@ -3122,7 +3125,8 @@ ha_innobase::position(
memcpy
(
ref
,
prebuilt
->
row_id
,
len
);
}
else
{
len
=
store_key_val_for_row
(
primary_key
,
(
char
*
)
ref
,
record
);
len
=
store_key_val_for_row
(
primary_key
,
(
char
*
)
ref
,
ref_length
,
record
);
}
/* Since we do not store len to the buffer 'ref', we must assume
...
...
sql/ha_innodb.h
View file @
95ffe2d0
...
...
@@ -76,7 +76,8 @@ class ha_innobase: public handler
longlong
auto_inc_counter_for_this_stat
;
ulong
max_row_length
(
const
byte
*
buf
);
uint
store_key_val_for_row
(
uint
keynr
,
char
*
buff
,
const
byte
*
record
);
uint
store_key_val_for_row
(
uint
keynr
,
char
*
buff
,
uint
buff_len
,
const
byte
*
record
);
int
update_thd
(
THD
*
thd
);
int
change_active_index
(
uint
keynr
);
int
general_fetch
(
byte
*
buf
,
uint
direction
,
uint
match_mode
);
...
...
sql/handler.h
View file @
95ffe2d0
...
...
@@ -189,7 +189,8 @@ class handler :public Sql_alloc
public:
byte
*
ref
;
/* Pointer to current row */
byte
*
dupp_ref
;
/* Pointer to dupp row */
uint
ref_length
;
/* Length of ref (1-8) */
uint
ref_length
;
/* Length of ref (1-8 or the clustered
key length) */
uint
block_size
;
/* index block size */
ha_rows
records
;
/* Records i datafilen */
ha_rows
deleted
;
/* Deleted records */
...
...
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