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
dd129ed3
Commit
dd129ed3
authored
Jul 17, 2005
by
patg@radha.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Federated Storage Engine, bug 9925 "Federated query processor (step 2 or step 3) not using logic in
WHERE statement"
parent
db1fb6a7
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
233 additions
and
276 deletions
+233
-276
sql/ha_federated.cc
sql/ha_federated.cc
+185
-269
sql/ha_federated.h
sql/ha_federated.h
+45
-4
sql/share/errmsg.txt
sql/share/errmsg.txt
+3
-3
No files found.
sql/ha_federated.cc
View file @
dd129ed3
This diff is collapsed.
Click to expand it.
sql/ha_federated.h
View file @
dd129ed3
...
...
@@ -30,6 +30,42 @@
#define FEDERATED_QUERY_BUFFER_SIZE STRING_BUFFER_USUAL_SIZE * 5
#define FEDERATED_RECORDS_IN_RANGE 2
#define FEDERATED_INFO " SHOW TABLE STATUS LIKE "
#define FEDERATED_SELECT "SELECT "
#define FEDERATED_WHERE " WHERE "
#define FEDERATED_FROM " FROM "
#define FEDERATED_PERCENT "%"
#define FEDERATED_IS " IS "
#define FEDERATED_NULL " NULL "
#define FEDERATED_ISNULL " IS NULL "
#define FEDERATED_LIKE " LIKE "
#define FEDERATED_TRUNCATE "TRUNCATE "
#define FEDERATED_DELETE "DELETE "
#define FEDERATED_INSERT "INSERT INTO "
#define FEDERATED_LIMIT1 " LIMIT 1"
#define FEDERATED_VALUES "VALUES "
#define FEDERATED_UPDATE "UPDATE "
#define FEDERATED_SET "SET "
#define FEDERATED_AND " AND "
#define FEDERATED_CONJUNCTION ") AND ("
#define FEDERATED_OR " OR "
#define FEDERATED_NOT " NOT "
#define FEDERATED_STAR "* "
#define FEDERATED_SPACE " "
#define FEDERATED_SQUOTE "'"
#define FEDERATED_COMMA ", "
#define FEDERATED_DQOUTE '"'
#define FEDERATED_BTICK "`"
#define FEDERATED_OPENPAREN " ("
#define FEDERATED_CLOSEPAREN ") "
#define FEDERATED_NE " != "
#define FEDERATED_GT " > "
#define FEDERATED_LT " < "
#define FEDERATED_LE " <= "
#define FEDERATED_GE " >= "
#define FEDERATED_EQ " = "
#define FEDERATED_1EQ0 " 1=0"
/*
FEDERATED_SHARE is a structure that will be shared amoung all open handlers
The example implements the minimum of what you will probably need.
...
...
@@ -65,7 +101,7 @@ class ha_federated: public handler
THR_LOCK_DATA
lock
;
/* MySQL lock */
FEDERATED_SHARE
*
share
;
/* Shared lock info */
MYSQL
*
mysql
;
/* MySQL connection */
MYSQL_RES
*
result
;
MYSQL_RES
*
stored_
result
;
bool
scan_flag
;
uint
ref_length
;
uint
fetch_num
;
// stores the fetch num
...
...
@@ -84,7 +120,7 @@ private:
public:
ha_federated
(
TABLE
*
table
)
:
handler
(
table
),
mysql
(
0
),
result
(
0
),
scan_flag
(
0
),
mysql
(
0
),
stored_
result
(
0
),
scan_flag
(
0
),
ref_length
(
sizeof
(
MYSQL_ROW_OFFSET
)),
current_position
(
0
)
{
}
...
...
@@ -145,13 +181,18 @@ public:
double
scan_time
()
{
DBUG_PRINT
(
"info"
,
(
"records %d"
,
records
));
return
(
double
)(
records
*
1000
);
(
"records %d"
,
records
));
return
(
double
)(
records
*
1000
);
}
/*
The next method will never be called if you do not implement indexes.
*/
double
read_time
(
uint
index
,
uint
ranges
,
ha_rows
rows
)
{
/*
Per Brian, this number is bugus, but this method must be implemented,
and at a later date, he intends to document this issue for handler code
*/
return
(
double
)
rows
/
20.0
+
1
;
}
...
...
sql/share/errmsg.txt
View file @
dd129ed3
...
...
@@ -5370,11 +5370,11 @@ ER_SCALE_BIGGER_THAN_PRECISION 42000 S1009
eng "Scale may not be larger than the precision (column '%-.64s')."
ER_WRONG_LOCK_OF_SYSTEM_TABLE
eng "You can't combine write-locking of system '%-.64s.%-.64s' table with other tables"
ER_CONNECT_TO_FOREIGN_DATA_S
RC
ER_CONNECT_TO_FOREIGN_DATA_S
OURCE
eng "Unable to connect to foreign data source - database '%s'!"
ER_QUERY_ON_FOREIGN_DATA_S
RC
ER_QUERY_ON_FOREIGN_DATA_S
OURCE
eng "There was a problem processing the query on the foreign data source. Data source error: '%-.64s'"
ER_FOREIGN_DATA_S
RC
_DOESNT_EXIST
ER_FOREIGN_DATA_S
OURCE
_DOESNT_EXIST
eng "The foreign data source you are trying to reference does not exist. Data source error : '%-.64s'"
ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE
eng "Can't create federated table. The data source connection string '%-.64s' is not in the correct format"
...
...
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