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
0ade4017
Commit
0ade4017
authored
Apr 08, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
always call start_bulk_insert, clarify this behaviour in comment block
change 10 to a #define'd constant
parent
62fa4013
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
myisam/myisamdef.h
myisam/myisamdef.h
+1
-0
sql/ha_myisam.cc
sql/ha_myisam.cc
+1
-1
sql/sql_insert.cc
sql/sql_insert.cc
+9
-1
No files found.
myisam/myisamdef.h
View file @
0ade4017
...
...
@@ -417,6 +417,7 @@ typedef struct st_mi_sort_param
#define MI_MIN_SIZE_BULK_INSERT_TREE 16384
/* this is per key */
#define MI_MIN_ROWS_TO_USE_BULK_INSERT 100
#define MI_MIN_ROWS_TO_DISABLE_INDEXES 100
#define MI_MIN_ROWS_TO_USE_WRITE_CACHE 10
/* The UNIQUE check is done with a hashed long key */
...
...
sql/ha_myisam.cc
View file @
0ade4017
...
...
@@ -868,7 +868,7 @@ void ha_myisam::start_bulk_insert(ha_rows rows)
ulong
size
=
min
(
thd
->
variables
.
read_buff_size
,
table
->
avg_row_length
*
rows
);
/* don't enable row cache if too few rows */
if
(
!
rows
&&
rows
>
10
)
if
(
!
rows
&&
rows
>
MI_MIN_ROWS_TO_USE_WRITE_CACHE
)
mi_extra
(
file
,
HA_EXTRA_WRITE_CACHE
,
(
void
*
)
&
size
);
can_enable_indexes
=
(
file
->
s
->
state
.
key_map
==
...
...
sql/sql_insert.cc
View file @
0ade4017
...
...
@@ -260,7 +260,15 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
thd
->
proc_info
=
"update"
;
if
(
duplic
!=
DUP_ERROR
)
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
if
(
lock_type
!=
TL_WRITE_DELAYED
&&
values_list
.
elements
!=
1
);
/*
let's *try* to start bulk inserts. It won't necessary
start them as values_list.elements should be greater than
some - handler dependent - threshold.
So we call start_bulk_insert to perform nesessary checks on
values_list.elements, and - if nothing else - to initialize
the code to make the call of end_bulk_insert() below safe.
*/
if
(
lock_type
!=
TL_WRITE_DELAYED
)
table
->
file
->
start_bulk_insert
(
values_list
.
elements
);
while
((
values
=
its
++
))
...
...
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