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
f2f5fd36
Commit
f2f5fd36
authored
Mar 30, 2011
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Plain Diff
merge LP BUG#68606
parents
69027708
1d8cfe3c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
38 deletions
+23
-38
mysql-test/include/maria_make_snapshot_for_comparison.inc
mysql-test/include/maria_make_snapshot_for_comparison.inc
+1
-0
mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc
...test/include/maria_make_snapshot_for_feeding_recovery.inc
+1
-0
sql/sql_base.cc
sql/sql_base.cc
+21
-38
No files found.
mysql-test/include/maria_make_snapshot_for_comparison.inc
View file @
f2f5fd36
...
...
@@ -8,6 +8,7 @@
# cover tables mysqltest.$mms_tname1,...$mms_tnameN
connection
admin
;
--
source
include
/
wait_until_connected_again
.
inc
let
$mms_table_to_use
=
$mms_tables
;
let
$mms_purpose
=
comparison
;
...
...
mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc
View file @
f2f5fd36
...
...
@@ -11,6 +11,7 @@
connection
admin
;
--
source
include
/
wait_until_connected_again
.
inc
let
$mms_table_to_use
=
$mms_tables
;
let
$mms_purpose
=
feeding_recovery
;
...
...
sql/sql_base.cc
View file @
f2f5fd36
...
...
@@ -8467,28 +8467,33 @@ fill_record(THD *thd, Field **ptr, List<Item> &values, bool ignore_errors,
List
<
TABLE
>
tbl_list
;
Item
*
value
;
TABLE
*
table
=
0
;
Field
*
field
;
bool
abort_on_warning_saved
=
thd
->
abort_on_warning
;
DBUG_ENTER
(
"fill_record"
);
Field
*
field
;
tbl_list
.
empty
();
if
(
!*
ptr
)
{
/* No fields to update, quite strange!*/
DBUG_RETURN
(
0
);
}
/*
On INSERT or UPDATE fields are checked to be from the same table,
thus we safely can take table from the first field.
*/
table
=
(
*
ptr
)
->
table
;
/*
Reset the table->auto_increment_field_not_null as it is valid for
only one row.
*/
if
(
*
ptr
)
{
/*
On INSERT or UPDATE fields are checked to be from the same table,
thus we safely can take table from the first field.
*/
table
=
(
*
ptr
)
->
table
;
table
->
auto_increment_field_not_null
=
FALSE
;
}
table
->
auto_increment_field_not_null
=
FALSE
;
while
((
field
=
*
ptr
++
)
&&
!
thd
->
is_error
())
{
/* Ensure that all fields are from the same table */
DBUG_ASSERT
(
field
->
table
==
table
);
value
=
v
++
;
table
=
field
->
table
;
if
(
field
==
table
->
next_number_field
)
table
->
auto_increment_field_not_null
=
TRUE
;
if
(
field
->
vcol_info
&&
...
...
@@ -8503,45 +8508,23 @@ fill_record(THD *thd, Field **ptr, List<Item> &values, bool ignore_errors,
field
->
field_name
,
table
->
s
->
table_name
.
str
);
thd
->
abort_on_warning
=
abort_on_warning_saved
;
}
if
(
use_value
)
value
->
save_val
(
field
);
else
if
(
value
->
save_in_field
(
field
,
0
)
<
0
)
goto
err
;
tbl_list
.
push_back
(
table
);
}
/* Update virtual fields*/
thd
->
abort_on_warning
=
FALSE
;
if
(
tbl_list
.
head
())
{
List_iterator_fast
<
TABLE
>
t
(
tbl_list
);
TABLE
*
prev_table
=
0
;
while
((
table
=
t
++
))
{
/*
Do simple optimization to prevent unnecessary re-generating
values for virtual fields
*/
if
(
table
!=
prev_table
)
{
prev_table
=
table
;
if
(
table
->
vfield
)
{
if
(
update_virtual_fields
(
thd
,
table
,
TRUE
))
{
goto
err
;
}
}
}
}
}
if
(
table
->
vfield
&&
update_virtual_fields
(
thd
,
table
,
TRUE
))
goto
err
;
thd
->
abort_on_warning
=
abort_on_warning_saved
;
DBUG_RETURN
(
thd
->
is_error
());
err:
thd
->
abort_on_warning
=
abort_on_warning_saved
;
if
(
table
)
table
->
auto_increment_field_not_null
=
FALSE
;
table
->
auto_increment_field_not_null
=
FALSE
;
DBUG_RETURN
(
TRUE
);
}
...
...
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