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
8f0ae632
Commit
8f0ae632
authored
Mar 23, 2013
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Upated columns must be allocated before opening the table
modified: storage/connect/connect.cc
parent
7a7ff18c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
storage/connect/connect.cc
storage/connect/connect.cc
+25
-25
No files found.
storage/connect/connect.cc
View file @
8f0ae632
...
@@ -294,31 +294,6 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
...
@@ -294,31 +294,6 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
colp
->
AddColUse
(
U_P
);
// For PLG tables
colp
->
AddColUse
(
U_P
);
// For PLG tables
}
// endfor colp
}
// endfor colp
// Now do open the physical table
tdbp
->
SetMode
(
mode
);
if
(
del
&&
((
PTDBASE
)
tdbp
)
->
GetFtype
()
!=
RECFM_NAF
)
{
// To avoid erasing the table when doing a partial delete
// make a fake Next
PDOSDEF
ddp
=
new
(
g
)
DOSDEF
;
PTDB
tp
=
new
(
g
)
TDBDOS
(
ddp
,
NULL
);
tdbp
->
SetNext
(
tp
);
dup
->
Check
&=
~
CHK_DELETE
;
}
// endif del
if
(
xtrace
)
printf
(
"About to open the table: tdbp=%p
\n
"
,
tdbp
);
if
(
mode
!=
MODE_ANY
)
{
if
(
tdbp
->
OpenDB
(
g
))
{
printf
(
"%s
\n
"
,
g
->
Message
);
return
true
;
}
else
tdbp
->
SetNext
(
NULL
);
}
// endif mode
/*********************************************************************/
/*********************************************************************/
/* In Update mode, the updated column blocks must be distinct from */
/* In Update mode, the updated column blocks must be distinct from */
/* the read column blocks. So make a copy of the TDB and allocate */
/* the read column blocks. So make a copy of the TDB and allocate */
...
@@ -355,10 +330,35 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
...
@@ -355,10 +330,35 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
}
else
if
(
tdbp
&&
mode
==
MODE_INSERT
)
}
else
if
(
tdbp
&&
mode
==
MODE_INSERT
)
((
PTDBASE
)
tdbp
)
->
SetSetCols
(
tdbp
->
GetColumns
());
((
PTDBASE
)
tdbp
)
->
SetSetCols
(
tdbp
->
GetColumns
());
// Now do open the physical table
if
(
xtrace
)
if
(
xtrace
)
printf
(
"Opening table %s in mode %d tdbp=%p
\n
"
,
printf
(
"Opening table %s in mode %d tdbp=%p
\n
"
,
tdbp
->
GetName
(),
mode
,
tdbp
);
tdbp
->
GetName
(),
mode
,
tdbp
);
tdbp
->
SetMode
(
mode
);
if
(
del
&&
((
PTDBASE
)
tdbp
)
->
GetFtype
()
!=
RECFM_NAF
)
{
// To avoid erasing the table when doing a partial delete
// make a fake Next
PDOSDEF
ddp
=
new
(
g
)
DOSDEF
;
PTDB
tp
=
new
(
g
)
TDBDOS
(
ddp
,
NULL
);
tdbp
->
SetNext
(
tp
);
dup
->
Check
&=
~
CHK_DELETE
;
}
// endif del
if
(
xtrace
)
printf
(
"About to open the table: tdbp=%p
\n
"
,
tdbp
);
if
(
mode
!=
MODE_ANY
)
{
if
(
tdbp
->
OpenDB
(
g
))
{
printf
(
"%s
\n
"
,
g
->
Message
);
return
true
;
}
else
tdbp
->
SetNext
(
NULL
);
}
// endif mode
return
false
;
return
false
;
}
// end of CntOpenTable
}
// end of CntOpenTable
...
...
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