Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
d376a2d6
Commit
d376a2d6
authored
5 years ago
by
Mergen Imeev
Committed by
Kirill Yukhin
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
sql: remove field zErrMsg from struct Vdbe
This field has become unused and should be removed.
parent
15e7bb19
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/box/sql/vdbeInt.h
+0
-1
0 additions, 1 deletion
src/box/sql/vdbeInt.h
src/box/sql/vdbeaux.c
+4
-25
4 additions, 25 deletions
src/box/sql/vdbeaux.c
with
4 additions
and
26 deletions
src/box/sql/vdbeInt.h
+
0
−
1
View file @
d376a2d6
...
...
@@ -381,7 +381,6 @@ struct Vdbe {
Mem
**
apArg
;
/* Arguments to currently executing user function */
Mem
*
aColName
;
/* Column names to return */
Mem
*
pResultSet
;
/* Pointer to an array of results */
char
*
zErrMsg
;
/* Error message written here */
VdbeCursor
**
apCsr
;
/* One element of this array for each open cursor */
Mem
*
aVar
;
/* Values for the OP_Variable opcode. */
/**
...
...
This diff is collapsed.
Click to expand it.
src/box/sql/vdbeaux.c
+
4
−
25
View file @
d376a2d6
...
...
@@ -1883,7 +1883,6 @@ closeCursorsAndFree(Vdbe * p)
static
void
Cleanup
(
Vdbe
*
p
)
{
sql
*
db
=
p
->
db
;
#ifdef SQL_DEBUG
/* Execute assert() statements to ensure that the Vdbe.apCsr[] and
...
...
@@ -1899,8 +1898,6 @@ Cleanup(Vdbe * p)
}
#endif
sqlDbFree
(
db
,
p
->
zErrMsg
);
p
->
zErrMsg
=
0
;
p
->
pResultSet
=
0
;
}
...
...
@@ -2243,8 +2240,6 @@ sqlVdbeHalt(Vdbe * p)
if
(
p
->
rc
==
SQL_OK
||
(
p
->
rc
&
0xff
)
==
SQL_CONSTRAINT
)
{
p
->
rc
=
rc
;
sqlDbFree
(
db
,
p
->
zErrMsg
);
p
->
zErrMsg
=
0
;
}
closeCursorsAndFree
(
p
);
sqlRollbackAll
(
p
);
...
...
@@ -2307,24 +2302,13 @@ sqlVdbeTransferError(Vdbe * p)
{
sql
*
db
=
p
->
db
;
int
rc
=
p
->
rc
;
if
(
p
->
zErrMsg
)
{
db
->
bBenignMalloc
++
;
sqlBeginBenignMalloc
();
if
(
db
->
pErr
==
0
)
db
->
pErr
=
sqlValueNew
(
db
);
sqlValueSetStr
(
db
->
pErr
,
-
1
,
p
->
zErrMsg
,
SQL_TRANSIENT
);
sqlEndBenignMalloc
();
db
->
bBenignMalloc
--
;
db
->
errCode
=
rc
;
}
else
{
sqlError
(
db
,
rc
);
}
sqlError
(
db
,
rc
);
return
rc
;
}
/*
* Clean up a VDBE after execution but do not delete the VDBE just yet.
*
Write any error messages into *pzErrMsg.
Return the result code.
* Return the result code.
*
* After this routine is run, the VDBE should be ready to be executed
* again.
...
...
@@ -2352,8 +2336,6 @@ sqlVdbeReset(Vdbe * p)
*/
if
(
p
->
pc
>=
0
)
{
sqlVdbeTransferError
(
p
);
sqlDbFree
(
db
,
p
->
zErrMsg
);
p
->
zErrMsg
=
0
;
if
(
p
->
runOnlyOnce
)
p
->
expired
=
1
;
}
else
if
(
p
->
rc
&&
p
->
expired
)
{
...
...
@@ -2361,10 +2343,7 @@ sqlVdbeReset(Vdbe * p)
* to sql_step(). For consistency (since sql_step() was
* called), set the database error in this case as well.
*/
sqlErrorWithMsg
(
db
,
p
->
rc
,
p
->
zErrMsg
?
"%s"
:
0
,
p
->
zErrMsg
);
sqlDbFree
(
db
,
p
->
zErrMsg
);
p
->
zErrMsg
=
0
;
sqlErrorWithMsg
(
db
,
p
->
rc
,
NULL
);
}
/* Reclaim all memory used by the VDBE
...
...
@@ -2418,7 +2397,7 @@ sqlVdbeReset(Vdbe * p)
/*
* Clean up and delete a VDBE after execution. Return an integer which is
* the result code.
Write any error message text into *pzErrMsg.
* the result code.
*/
int
sqlVdbeFinalize
(
Vdbe
*
p
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment