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
54d4589d
Commit
54d4589d
authored
Dec 05, 2013
by
Olivier Bertrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Previous MDEV-5261 was generating wrong warnings
modified: storage/connect/ha_connect.cc
parent
a8b09c14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
39 deletions
+43
-39
storage/connect/ha_connect.cc
storage/connect/ha_connect.cc
+43
-39
No files found.
storage/connect/ha_connect.cc
View file @
54d4589d
...
...
@@ -4600,9 +4600,9 @@ int ha_connect::create(const char *name, TABLE *table_arg,
}
// endfor field
if
(
IsFileType
(
type
))
{
table
=
table_arg
;
// Used by called functions
table
=
table_arg
;
// Used by called functions
if
(
IsFileType
(
type
))
{
if
(
!
options
->
filename
)
{
// The file name is not specified, create a default file in
// the database directory named table_name.table_type.
...
...
@@ -4666,45 +4666,48 @@ int ha_connect::create(const char *name, TABLE *table_arg,
}
// endif filename
// To check whether indexes have to be made or remade
if
(
!
g
->
Xchk
)
{
PIXDEF
xdp
;
}
// endif type
// We should be in CREATE TABLE
if
(
thd_sql_command
(
table
->
in_use
)
!=
SQLCOM_CREATE_TABLE
)
push_warning
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
0
,
"Wrong command in create, please contact CONNECT team"
);
// To check whether indexes have to be made or remade
if
(
!
g
->
Xchk
)
{
PIXDEF
xdp
;
// Get the index definitions
if
(
xdp
=
GetIndexInfo
())
{
if
(
IsTypeIndexable
(
type
))
{
PDBUSER
dup
=
PlgGetUser
(
g
);
PCATLG
cat
=
(
dup
)
?
dup
->
Catalog
:
NULL
;
if
(
cat
)
{
cat
->
SetDataPath
(
g
,
table_arg
->
s
->
db
.
str
);
if
((
rc
=
optimize
(
table
->
in_use
,
NULL
)))
{
printf
(
"Create rc=%d %s
\n
"
,
rc
,
g
->
Message
);
my_message
(
ER_UNKNOWN_ERROR
,
g
->
Message
,
MYF
(
0
));
rc
=
HA_ERR_INTERNAL_ERROR
;
}
else
CloseTable
(
g
);
}
// endif cat
}
else
{
sprintf
(
g
->
Message
,
"Table type %s is not indexable"
,
options
->
type
);
my_message
(
ER_UNKNOWN_ERROR
,
g
->
Message
,
MYF
(
0
));
rc
=
HA_ERR_INTERNAL_ERROR
;
}
// endif Indexable
// We should be in CREATE TABLE
if
(
thd_sql_command
(
table
->
in_use
)
!=
SQLCOM_CREATE_TABLE
)
push_warning
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
0
,
"Wrong command in create, please contact CONNECT team"
);
}
// endif xdp
// Get the index definitions
if
(
xdp
=
GetIndexInfo
())
{
if
(
IsTypeIndexable
(
type
))
{
PDBUSER
dup
=
PlgGetUser
(
g
);
PCATLG
cat
=
(
dup
)
?
dup
->
Catalog
:
NULL
;
if
(
cat
)
{
cat
->
SetDataPath
(
g
,
table_arg
->
s
->
db
.
str
);
if
((
rc
=
optimize
(
table
->
in_use
,
NULL
)))
{
printf
(
"Create rc=%d %s
\n
"
,
rc
,
g
->
Message
);
my_message
(
ER_UNKNOWN_ERROR
,
g
->
Message
,
MYF
(
0
));
rc
=
HA_ERR_INTERNAL_ERROR
;
}
else
CloseTable
(
g
);
}
// endif cat
}
else
{
sprintf
(
g
->
Message
,
"Table type %s is not indexable"
,
options
->
type
);
my_message
(
ER_UNKNOWN_ERROR
,
g
->
Message
,
MYF
(
0
));
rc
=
HA_ERR_INTERNAL_ERROR
;
}
// endif Indexable
}
else
{
PIXDEF
xdp
=
GetIndexInfo
();
}
// endif xdp
if
(
xdp
&&
!
IsTypeIndexable
(
type
))
{
}
else
{
PIXDEF
xdp
=
GetIndexInfo
();
if
(
xdp
)
{
if
(
!
IsTypeIndexable
(
type
))
{
g
->
Xchk
=
NULL
;
sprintf
(
g
->
Message
,
"Table type %s is not indexable"
,
options
->
type
);
my_message
(
ER_UNKNOWN_ERROR
,
g
->
Message
,
MYF
(
0
));
...
...
@@ -4714,11 +4717,12 @@ int ha_connect::create(const char *name, TABLE *table_arg,
((
PCHK
)
g
->
Xchk
)
->
newsep
=
GetBooleanOption
(
"Sepindex"
,
false
);
}
// endif Indexable
}
// endif Xchk
}
else
if
(
!
((
PCHK
)
g
->
Xchk
)
->
oldpix
)
g
->
Xchk
=
NULL
;
table
=
st
;
}
// endif type
}
// endif Xchk
table
=
st
;
DBUG_RETURN
(
rc
);
}
// end of create
...
...
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