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
eaa7f6ab
Commit
eaa7f6ab
authored
May 27, 2005
by
dlenev@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-ttdf
parents
34901082
0ef32672
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
sql/sp_head.cc
sql/sp_head.cc
+3
-3
sql/sp_head.h
sql/sp_head.h
+3
-4
sql/sql_yacc.yy
sql/sql_yacc.yy
+8
-5
No files found.
sql/sp_head.cc
View file @
eaa7f6ab
...
...
@@ -1499,8 +1499,8 @@ sp_instr_set_trigger_field::execute(THD *thd, uint *nextp)
DBUG_ENTER
(
"sp_instr_set_trigger_field::execute"
);
/* QQ: Still unsure what should we return in case of error 1 or -1 ? */
if
(
!
value
->
fixed
&&
value
->
fix_fields
(
thd
,
0
,
&
value
)
||
trigger_field
.
fix_fields
(
thd
,
0
,
0
)
||
(
value
->
save_in_field
(
trigger_field
.
field
,
0
)
<
0
))
trigger_field
->
fix_fields
(
thd
,
0
,
0
)
||
(
value
->
save_in_field
(
trigger_field
->
field
,
0
)
<
0
))
res
=
-
1
;
*
nextp
=
m_ip
+
1
;
DBUG_RETURN
(
res
);
...
...
@@ -1510,7 +1510,7 @@ void
sp_instr_set_trigger_field
::
print
(
String
*
str
)
{
str
->
append
(
"set "
,
4
);
trigger_field
.
print
(
str
);
trigger_field
->
print
(
str
);
str
->
append
(
":="
,
2
);
value
->
print
(
str
);
}
...
...
sql/sp_head.h
View file @
eaa7f6ab
...
...
@@ -467,9 +467,9 @@ class sp_instr_set_trigger_field : public sp_instr
public:
sp_instr_set_trigger_field
(
uint
ip
,
sp_pcontext
*
ctx
,
LEX_STRING
field_name
,
Item
*
val
)
Item_trigger_field
*
trg_fld
,
Item
*
val
)
:
sp_instr
(
ip
,
ctx
),
trigger_field
(
Item_trigger_field
::
NEW_ROW
,
field_name
.
str
),
trigger_field
(
trg_fld
),
value
(
val
)
{}
...
...
@@ -480,9 +480,8 @@ public:
virtual
void
print
(
String
*
str
);
Item_trigger_field
trigger_field
;
private:
Item_trigger_field
*
trigger_field
;
Item
*
value
;
};
// class sp_instr_trigger_field : public sp_instr
...
...
sql/sql_yacc.yy
View file @
eaa7f6ab
...
...
@@ -7569,6 +7569,7 @@ sys_option_value:
{
/* We are in trigger and assigning value to field of new row */
Item *it;
Item_trigger_field *trg_fld;
sp_instr_set_trigger_field *i;
if ($1)
{
...
...
@@ -7589,17 +7590,19 @@ sys_option_value:
it= new Item_null();
}
if (!(i= new sp_instr_set_trigger_field(
if (!(trg_fld= new Item_trigger_field(Item_trigger_field::NEW_ROW,
$2.base_name.str)) ||
!(i= new sp_instr_set_trigger_field(
lex->sphead->instructions(), lex->spcont,
$2.base_name
, it)))
trg_fld
, it)))
YYABORT;
/*
Let us add this item to list of all Item_trigger_field
objects in trigger.
*/
lex->trg_table_fields.link_in_list((byte *)
&i->trigger_fie
ld,
(byte **)&i->trigger_field.
next_trg_field);
lex->trg_table_fields.link_in_list((byte *)
trg_f
ld,
(byte **)&trg_fld->
next_trg_field);
lex->sphead->add_instr(i);
}
...
...
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