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
097bc929
Commit
097bc929
authored
Jan 26, 2005
by
patg@patrick-galbraiths-computer.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes to get rid of compile warnings in both ha_federated.cc and ha_federated.h
parent
470aed3a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
sql/ha_federated.cc
sql/ha_federated.cc
+14
-13
sql/ha_federated.h
sql/ha_federated.h
+1
-1
No files found.
sql/ha_federated.cc
View file @
097bc929
...
...
@@ -415,7 +415,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, uint table_create_fla
share
->
scheme
=
my_strdup
(
table
->
s
->
comment
,
MYF
(
0
));
if
(
share
->
username
=
strstr
(
share
->
scheme
,
"://"
))
if
(
(
share
->
username
=
strstr
(
share
->
scheme
,
"://"
)
))
{
share
->
scheme
[
share
->
username
-
share
->
scheme
]
=
'\0'
;
if
(
strcmp
(
share
->
scheme
,
"mysql"
)
!=
0
)
...
...
@@ -429,18 +429,18 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, uint table_create_fla
}
share
->
username
+=
3
;
if
(
share
->
hostname
=
strchr
(
share
->
username
,
'@'
))
if
(
(
share
->
hostname
=
strchr
(
share
->
username
,
'@'
)
))
{
share
->
username
[
share
->
hostname
-
share
->
username
]
=
'\0'
;
share
->
hostname
++
;
if
(
share
->
password
=
strchr
(
share
->
username
,
':'
))
if
(
(
share
->
password
=
strchr
(
share
->
username
,
':'
)
))
{
share
->
username
[
share
->
password
-
share
->
username
]
=
'\0'
;
share
->
password
++
;
share
->
username
=
share
->
username
;
// make sure there isn't an extra / or @
if
(
strchr
(
share
->
password
,
'/'
)
||
strchr
(
share
->
hostname
,
'@'
))
if
(
(
strchr
(
share
->
password
,
'/'
)
||
strchr
(
share
->
hostname
,
'@'
)
))
{
DBUG_PRINT
(
"ha_federated::parse_url"
,
(
"this connection string is not in the correct format!!!
\n
"
));
...
...
@@ -453,14 +453,14 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, uint table_create_fla
user:@hostname:port/database/table
Then password is a null string, so set to NULL
*/
if
(
share
->
password
[
0
]
==
'\0'
)
if
(
(
share
->
password
[
0
]
==
'\0'
)
)
share
->
password
=
NULL
;
}
else
share
->
username
=
share
->
username
;
// make sure there isn't an extra / or @
if
(
strchr
(
share
->
username
,
'/'
)
||
strchr
(
share
->
hostname
,
'@'
))
if
(
(
strchr
(
share
->
username
,
'/'
))
||
(
strchr
(
share
->
hostname
,
'@'
)
))
{
DBUG_PRINT
(
"ha_federated::parse_url"
,
(
"this connection string is not in the correct format!!!
\n
"
));
...
...
@@ -469,12 +469,12 @@ Then password is a null string, so set to NULL
DBUG_RETURN
(
-
1
);
}
if
(
share
->
database
=
strchr
(
share
->
hostname
,
'/'
))
if
(
(
share
->
database
=
strchr
(
share
->
hostname
,
'/'
)
))
{
share
->
hostname
[
share
->
database
-
share
->
hostname
]
=
'\0'
;
share
->
database
++
;
if
(
share
->
sport
=
strchr
(
share
->
hostname
,
':'
))
if
(
(
share
->
sport
=
strchr
(
share
->
hostname
,
':'
)
))
{
share
->
hostname
[
share
->
sport
-
share
->
hostname
]
=
'\0'
;
share
->
sport
++
;
...
...
@@ -484,7 +484,7 @@ Then password is a null string, so set to NULL
share
->
port
=
atoi
(
share
->
sport
);
}
if
(
share
->
table_base_name
=
strchr
(
share
->
database
,
'/'
))
if
(
(
share
->
table_base_name
=
strchr
(
share
->
database
,
'/'
)
))
{
share
->
database
[
share
->
table_base_name
-
share
->
database
]
=
'\0'
;
share
->
table_base_name
++
;
...
...
@@ -507,7 +507,7 @@ Then password is a null string, so set to NULL
DBUG_RETURN
(
-
1
);
}
// make sure there's not an extra /
if
(
strchr
(
share
->
table_base_name
,
'/'
))
if
(
(
strchr
(
share
->
table_base_name
,
'/'
)
))
{
DBUG_PRINT
(
"ha_federated::parse_url"
,
(
"this connection string is not in the correct format!!!
\n
"
));
...
...
@@ -696,6 +696,7 @@ bool ha_federated::create_where_from_key(
key_length
-=
length
;
DBUG_RETURN
(
0
);
}
DBUG_RETURN
(
1
);
}
int
load_conn_info
(
FEDERATED_SHARE
*
share
,
TABLE
*
table
)
...
...
@@ -965,7 +966,7 @@ int ha_federated::write_row(byte * buf)
int
x
=
0
,
num_fields
=
0
;
Field
**
field
;
ulong
current_query_id
=
1
;
ulong
tmp_query_id
;
ulong
tmp_query_id
=
1
;
int
all_fields_have_same_query_id
=
1
;
char
insert_buffer
[
IO_SIZE
];
...
...
@@ -1129,8 +1130,8 @@ int ha_federated::update_row(
byte
*
new_data
)
{
u
int
x
=
0
;
uint
has_a_primary_key
;
int
x
=
0
;
uint
has_a_primary_key
=
0
;
int
primary_key_field_num
;
char
old_field_value_buffer
[
IO_SIZE
],
new_field_value_buffer
[
IO_SIZE
];
char
update_buffer
[
IO_SIZE
],
where_buffer
[
IO_SIZE
];
...
...
sql/ha_federated.h
View file @
097bc929
...
...
@@ -130,7 +130,7 @@ class ha_federated: public handler
/*
The next method will never be called if you do not implement indexes.
*/
virtual
double
read_time
(
ha_rows
rows
)
{
return
(
double
)
rows
/
20.0
+
1
;
}
virtual
double
read_time
(
uint
index
,
uint
ranges
,
ha_rows
rows
)
{
return
(
double
)
rows
/
20.0
+
1
;
}
/*
Everything below are methods that we implment in ha_federated.cc.
...
...
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