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
8e499f02
Commit
8e499f02
authored
Jan 15, 2006
by
aivanov@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to avoid compilation errors in MS Visual Studio 7.1
(reviewed by Mats)
parent
bd70a170
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
sql/log_event.cc
sql/log_event.cc
+4
-4
sql/sql_class.cc
sql/sql_class.cc
+5
-5
No files found.
sql/log_event.cc
View file @
8e499f02
...
...
@@ -5109,7 +5109,7 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
const
uint
byte_count
=
(
m_width
+
7
)
/
8
;
const
byte
*
const
ptr_rows_data
=
var_start
+
byte_count
+
1
;
my_size_t
const
data_size
=
event_len
-
(
ptr_rows_data
-
buf
);
my_size_t
const
data_size
=
event_len
-
(
ptr_rows_data
-
(
const
byte
*
)
buf
);
DBUG_PRINT
(
"info"
,(
"m_table_id=%lu, m_flags=%d, m_width=%u, data_size=%lu"
,
m_table_id
,
m_flags
,
m_width
,
data_size
));
...
...
@@ -6017,7 +6017,7 @@ bool Table_map_log_event::write_data_body(IO_CACHE *file)
DBUG_ASSERT
(
static_cast
<
my_size_t
>
(
cbuf_end
-
cbuf
)
<=
sizeof
(
cbuf
));
return
(
my_b_safe_write
(
file
,
dbuf
,
sizeof
(
dbuf
))
||
my_b_safe_write
(
file
,
m_dbnam
,
m_dblen
+
1
)
||
my_b_safe_write
(
file
,
(
const
byte
*
)
m_dbnam
,
m_dblen
+
1
)
||
my_b_safe_write
(
file
,
tbuf
,
sizeof
(
tbuf
))
||
my_b_safe_write
(
file
,
(
const
byte
*
)
m_tblnam
,
m_tbllen
+
1
)
||
my_b_safe_write
(
file
,
cbuf
,
cbuf_end
-
cbuf
)
||
...
...
@@ -6035,7 +6035,7 @@ bool Table_map_log_event::write_data_body(IO_CACHE *file)
void
Table_map_log_event
::
pack_info
(
Protocol
*
protocol
)
{
char
buf
[
256
];
my_size_t
bytes
=
snprintf
(
buf
,
sizeof
(
buf
),
"%s.%s"
,
m_dbnam
,
m_tblnam
);
my_size_t
bytes
=
my_
snprintf
(
buf
,
sizeof
(
buf
),
"%s.%s"
,
m_dbnam
,
m_tblnam
);
protocol
->
store
(
buf
,
bytes
,
&
my_charset_bin
);
}
...
...
@@ -6149,7 +6149,7 @@ char const *Write_rows_log_event::do_prepare_row(THD *thd, TABLE *table,
*/
DBUG_ASSERT
(
table
->
s
->
fields
>=
m_width
);
DBUG_ASSERT
(
ptr
);
ptr
=
unpack_row
(
table
,
(
char
*
)
table
->
record
[
0
],
ptr
,
&
m_cols
);
ptr
=
unpack_row
(
table
,
table
->
record
[
0
],
ptr
,
&
m_cols
);
return
ptr
;
}
...
...
sql/sql_class.cc
View file @
8e499f02
...
...
@@ -2325,7 +2325,7 @@ my_size_t THD::max_row_length_blob(TABLE *table, const byte *data) const
for
(
uint
*
ptr
=
beg
;
ptr
!=
end
;
++
ptr
)
{
Field_blob
*
const
blob
=
(
Field_blob
*
)
table
->
field
[
*
ptr
];
length
+=
blob
->
get_length
(
data
+
blob
->
offset
(
))
+
2
;
length
+=
blob
->
get_length
(
(
const
char
*
)
(
data
+
blob
->
offset
()
))
+
2
;
}
return
length
;
...
...
@@ -2344,7 +2344,7 @@ my_size_t THD::pack_row(TABLE *table, MY_BITMAP const* cols, byte *row_data,
for
(
int
i
=
0
;
field
;
i
++
,
p_field
++
,
field
=
*
p_field
)
{
if
(
bitmap_is_set
(
cols
,
i
))
ptr
=
(
byte
*
)
field
->
pack
(
ptr
,
field
->
ptr
+
offset
);
ptr
=
(
byte
*
)
field
->
pack
(
(
char
*
)
ptr
,
field
->
ptr
+
offset
);
}
/*
...
...
@@ -2377,12 +2377,12 @@ int THD::binlog_write_row(TABLE* table, bool is_trans,
if
(
!
table
->
s
->
blob_fields
)
{
/* multiply max_len by 2 so it can be used for update_row as well */
table
->
write_row_record
=
alloc_root
(
&
table
->
mem_root
,
2
*
max_len
);
table
->
write_row_record
=
(
byte
*
)
alloc_root
(
&
table
->
mem_root
,
2
*
max_len
);
if
(
!
table
->
write_row_record
)
return
HA_ERR_OUT_OF_MEM
;
row_data
=
table
->
write_row_record
;
}
else
if
(
unlikely
(
!
(
row_data
=
my_malloc
(
max_len
,
MYF
(
MY_WME
)))))
else
if
(
unlikely
(
!
(
row_data
=
(
byte
*
)
my_malloc
(
max_len
,
MYF
(
MY_WME
)))))
return
HA_ERR_OUT_OF_MEM
;
}
my_size_t
const
len
=
pack_row
(
table
,
cols
,
row_data
,
record
);
...
...
@@ -2396,7 +2396,7 @@ int THD::binlog_write_row(TABLE* table, bool is_trans,
error
=
likely
(
ev
!=
0
)
?
ev
->
add_row_data
(
row_data
,
len
)
:
HA_ERR_OUT_OF_MEM
;
if
(
table
->
write_row_record
==
0
)
my_free
(
row_data
,
MYF
(
MY_WME
));
my_free
(
(
gptr
)
row_data
,
MYF
(
MY_WME
));
return
error
;
}
...
...
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