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
0785b2d5
Commit
0785b2d5
authored
Aug 03, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
Merge '
https://github.com/Buggynours/MariaDB
10.0' into 10.0
parents
0a99293d
58a73e70
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
407 additions
and
19 deletions
+407
-19
.gitignore
.gitignore
+4
-0
storage/connect/ha_connect.cc
storage/connect/ha_connect.cc
+5
-3
storage/connect/jsonudf.cpp
storage/connect/jsonudf.cpp
+1
-1
storage/connect/mysql-test/connect/r/endian.result
storage/connect/mysql-test/connect/r/endian.result
+105
-0
storage/connect/mysql-test/connect/r/mysql_index.result
storage/connect/mysql-test/connect/r/mysql_index.result
+114
-0
storage/connect/mysql-test/connect/t/endian.test
storage/connect/mysql-test/connect/t/endian.test
+88
-0
storage/connect/mysql-test/connect/t/mysql_index.test
storage/connect/mysql-test/connect/t/mysql_index.test
+66
-0
storage/connect/tabmysql.cpp
storage/connect/tabmysql.cpp
+20
-12
storage/connect/tabodbc.cpp
storage/connect/tabodbc.cpp
+4
-3
No files found.
.gitignore
View file @
0785b2d5
...
@@ -277,6 +277,10 @@ storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result
...
@@ -277,6 +277,10 @@ storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result
*.vcproj.*
*.vcproj.*
*.vcproj.*.*
*.vcproj.*.*
*.vcproj.*.*.*
*.vcproj.*.*.*
*.vcxproj
*.vcxproj.*
*.vcxproj.*.*
*.vcxproj.*.*.*
# Build results
# Build results
[Dd]ebug/
[Dd]ebug/
...
...
storage/connect/ha_connect.cc
View file @
0785b2d5
...
@@ -169,7 +169,7 @@
...
@@ -169,7 +169,7 @@
#define JSONMAX 10 // JSON Default max grp size
#define JSONMAX 10 // JSON Default max grp size
extern
"C"
{
extern
"C"
{
char
version
[]
=
"Version 1.03.0007 Ju
ne 03
, 2015"
;
char
version
[]
=
"Version 1.03.0007 Ju
ly 05
, 2015"
;
#if defined(__WIN__)
#if defined(__WIN__)
char
compver
[]
=
"Version 1.03.0007 "
__DATE__
" "
__TIME__
;
char
compver
[]
=
"Version 1.03.0007 "
__DATE__
" "
__TIME__
;
char
slash
=
'\\'
;
char
slash
=
'\\'
;
...
@@ -2237,7 +2237,9 @@ bool ha_connect::MakeKeyWhere(PGLOBAL g, PSTRG qry, OPVAL op, char q,
...
@@ -2237,7 +2237,9 @@ bool ha_connect::MakeKeyWhere(PGLOBAL g, PSTRG qry, OPVAL op, char q,
case
OP_EQ
:
case
OP_EQ
:
case
OP_GT
:
case
OP_GT
:
case
OP_GE
:
case
OP_GE
:
oom
|=
qry
->
Append
((
PSZ
)
GetValStr
(
op
,
false
));
case
OP_LT
:
case
OP_LE
:
oom
|=
qry
->
Append
((
PSZ
)
GetValStr
(
op
,
false
));
break
;
break
;
default:
default:
oom
|=
qry
->
Append
(
" ??? "
);
oom
|=
qry
->
Append
(
" ??? "
);
...
@@ -6676,6 +6678,6 @@ maria_declare_plugin(connect)
...
@@ -6676,6 +6678,6 @@ maria_declare_plugin(connect)
NULL
,
/* status variables */
NULL
,
/* status variables */
connect_system_variables
,
/* system variables */
connect_system_variables
,
/* system variables */
"1.03.0007"
,
/* string version */
"1.03.0007"
,
/* string version */
MariaDB_PLUGIN_MATURITY_BETA
/* maturity */
MariaDB_PLUGIN_MATURITY_GAMMA
/* maturity */
}
}
maria_declare_plugin_end
;
maria_declare_plugin_end
;
storage/connect/jsonudf.cpp
View file @
0785b2d5
...
@@ -261,7 +261,7 @@ static PJVAL MakeValue(PGLOBAL g, UDF_ARGS *args, int i)
...
@@ -261,7 +261,7 @@ static PJVAL MakeValue(PGLOBAL g, UDF_ARGS *args, int i)
break
;
break
;
case
INT_RESULT
:
case
INT_RESULT
:
jvp
->
SetInteger
(
g
,
*
(
int
*
)
sap
);
jvp
->
SetInteger
(
g
,
(
int
)
*
(
long
long
*
)
sap
);
break
;
break
;
case
REAL_RESULT
:
case
REAL_RESULT
:
jvp
->
SetFloat
(
g
,
*
(
double
*
)
sap
);
jvp
->
SetFloat
(
g
,
*
(
double
*
)
sap
);
...
...
storage/connect/mysql-test/connect/r/endian.result
0 → 100644
View file @
0785b2d5
SET time_zone='+00:00';
#
# Testing little endian table
#
CREATE TABLE t1
(
fig INT(4) NOT NULL FIELD_FORMAT='C',
name CHAR(10) NOT NULL,
birth DATE NOT NULL FIELD_FORMAT='L',
id CHAR(5) NOT NULL FIELD_FORMAT='L2',
salary DOUBLE(9,2) NOT NULL DEFAULT 0.00 FIELD_FORMAT='LF',
dept INT(4) NOT NULL FIELD_FORMAT='L2'
) ENGINE=CONNECT TABLE_TYPE=BIN BLOCK_SIZE=5 FILE_NAME='Testbal.dat';
SELECT * FROM t1;
fig name birth id salary dept
5500 ARCHIBALD 1980-01-25 3789 4380.50 318
123 OLIVER 1953-08-10 23456 3400.68 2158
3123 FOO 2002-07-23 888 0.00 318
INSERT INTO t1 VALUES (5555,'RONALD','1980-02-26','3333',4444.44,555);
SELECT * FROM t1;
fig name birth id salary dept
5500 ARCHIBALD 1980-01-25 3789 4380.50 318
123 OLIVER 1953-08-10 23456 3400.68 2158
3123 FOO 2002-07-23 888 0.00 318
5555 RONALD 1980-02-26 3333 4444.44 555
DROP TABLE t1;
CREATE TABLE t1
(
fig INT(4) NOT NULL FIELD_FORMAT='C',
name CHAR(10) NOT NULL,
birth DATE NOT NULL,
id CHAR(5) NOT NULL FIELD_FORMAT='S',
salary DOUBLE(9,2) NOT NULL DEFAULT 0.00 FIELD_FORMAT='F',
dept INT(4) NOT NULL FIELD_FORMAT='S'
) ENGINE=CONNECT TABLE_TYPE=BIN BLOCK_SIZE=5 FILE_NAME='Testbal.dat' OPTION_LIST='Endian=Little';
SELECT * FROM t1;
fig name birth id salary dept
5500 ARCHIBALD 1980-01-25 3789 4380.50 318
123 OLIVER 1953-08-10 23456 3400.68 2158
3123 FOO 2002-07-23 888 0.00 318
5555 RONALD 1980-02-26 3333 4444.44 555
#
# Testing big endian table
#
CREATE TABLE t2 (
fig INT(4) NOT NULL FIELD_FORMAT='C',
name CHAR(10) NOT NULL,
birth DATE NOT NULL FIELD_FORMAT='B',
id CHAR(5) NOT NULL FIELD_FORMAT='BS',
salary DOUBLE(9,2) NOT NULL DEFAULT 0.00 FIELD_FORMAT='BF',
dept INT(4) NOT NULL FIELD_FORMAT='B2'
) ENGINE=CONNECT TABLE_TYPE=BIN BLOCK_SIZE=5 FILE_NAME='Testbal.bin';
INSERT INTO t2 SELECT * FROM t1;
SELECT * FROM t2;
fig name birth id salary dept
5500 ARCHIBALD 1980-01-25 3789 4380.50 318
123 OLIVER 1953-08-10 23456 3400.68 2158
3123 FOO 2002-07-23 888 0.00 318
5555 RONALD 1980-02-26 3333 4444.44 555
DROP TABLE t2;
CREATE TABLE t2 (
fig INT(4) NOT NULL FIELD_FORMAT='C',
name CHAR(10) NOT NULL,
birth DATE NOT NULL,
id CHAR(5) NOT NULL FIELD_FORMAT='S',
salary DOUBLE(9,2) NOT NULL DEFAULT 0.00 FIELD_FORMAT='F',
dept INT(4) NOT NULL FIELD_FORMAT='2'
) ENGINE=CONNECT TABLE_TYPE=BIN BLOCK_SIZE=5 FILE_NAME='Testbal.bin' OPTION_LIST='Endian=Big';
SELECT * FROM t2;
fig name birth id salary dept
5500 ARCHIBALD 1980-01-25 3789 4380.50 318
123 OLIVER 1953-08-10 23456 3400.68 2158
3123 FOO 2002-07-23 888 0.00 318
5555 RONALD 1980-02-26 3333 4444.44 555
DROP TABLE t2;
CREATE TABLE t2 (
fig CHAR(4) NOT NULL,
name CHAR(10) NOT NULL,
birth DATE NOT NULL,
id SMALLINT(5) NOT NULL,
salary DOUBLE(9,2) NOT NULL DEFAULT 0.00 FIELD_FORMAT='F',
dept SMALLINT(4) NOT NULL
) ENGINE=CONNECT TABLE_TYPE=BIN BLOCK_SIZE=5 FILE_NAME='Testbal.bin' OPTION_LIST='Endian=Big';
SELECT * FROM t2;
fig name birth id salary dept
5500 ARCHIBALD 1980-01-25 3789 4380.50 318
123 OLIVER 1953-08-10 23456 3400.68 2158
3123 FOO 2002-07-23 888 0.00 318
5555 RONALD 1980-02-26 3333 4444.44 555
DROP TABLE t2;
CREATE TABLE t2 (
fig INT(4) NOT NULL FIELD_FORMAT='C',
name CHAR(10) NOT NULL,
birth DATE NOT NULL FIELD_FORMAT='B',
id CHAR(5) NOT NULL FIELD_FORMAT='BS',
salary DOUBLE(9,2) NOT NULL DEFAULT 0.00 FIELD_FORMAT='BF',
dept SMALLINT(4) NOT NULL FIELD_FORMAT='B'
) ENGINE=CONNECT TABLE_TYPE=BIN BLOCK_SIZE=5 FILE_NAME='Testbal.bin';
SELECT * FROM t2;
fig name birth id salary dept
5500 ARCHIBALD 1980-01-25 3789 4380.50 318
123 OLIVER 1953-08-10 23456 3400.68 2158
3123 FOO 2002-07-23 888 0.00 318
5555 RONALD 1980-02-26 3333 4444.44 555
DROP TABLE t1, t2;
storage/connect/mysql-test/connect/r/mysql_index.result
0 → 100644
View file @
0785b2d5
#
# Make remote table
#
CREATE TABLE t1 (
id int(11) NOT NULL,
msg char(100) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES(1,'Un'),(3,'Trois'),(5,'Cinq');
INSERT INTO t1 VALUES(2,'Two'),(4,'Four'),(6,'Six');
SELECT * FROM t1;
id msg
1 Un
3 Trois
5 Cinq
2 Two
4 Four
6 Six
#
# Make local MYSQL table with indexed id column
#
CREATE TABLE t2 (
id int(11) NOT NULL,
msg char(100) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=CONNECT DEFAULT CHARSET=latin1 TABLE_TYPE=MYSQL TABNAME=t1;
#
# Testing SELECT, etc.
#
SELECT * FROM t2;
id msg
1 Un
3 Trois
5 Cinq
2 Two
4 Four
6 Six
SELECT * FROM t2 WHERE id = 3;
id msg
3 Trois
SELECT * FROM t2 WHERE id IN (2,4);
id msg
2 Two
4 Four
SELECT * FROM t2 WHERE id IN (2,4) AND msg = 'Two';
id msg
2 Two
SELECT * FROM t2 WHERE id > 3;
id msg
5 Cinq
4 Four
6 Six
SELECT * FROM t2 WHERE id >= 3;
id msg
3 Trois
5 Cinq
4 Four
6 Six
SELECT * FROM t2 WHERE id < 3;
id msg
1 Un
2 Two
SELECT * FROM t2 WHERE id < 3 OR id > 4;
id msg
1 Un
2 Two
5 Cinq
6 Six
SELECT * FROM t2 WHERE id <= 3;
id msg
1 Un
2 Two
3 Trois
SELECT * FROM t2 WHERE id BETWEEN 3 AND 5;
id msg
3 Trois
4 Four
5 Cinq
SELECT * FROM t2 WHERE id > 2 AND id < 6;
id msg
3 Trois
4 Four
5 Cinq
SELECT * FROM t2 ORDER BY id;
id msg
1 Un
2 Two
3 Trois
4 Four
5 Cinq
6 Six
UPDATE t2 SET msg = 'Five' WHERE id = 5;
Warnings:
Note 1105 t1: 1 affected rows
SELECT * FROM t2;
id msg
1 Un
3 Trois
5 Five
2 Two
4 Four
6 Six
DELETE FROM t2 WHERE id = 4;
Warnings:
Note 1105 t1: 1 affected rows
SELECT * FROM t2;
id msg
1 Un
3 Trois
5 Five
2 Two
6 Six
DROP TABLE t2;
DROP TABLE t1;
storage/connect/mysql-test/connect/t/endian.test
0 → 100644
View file @
0785b2d5
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
--
copy_file
$MTR_SUITE_DIR
/
std_data
/
Testbal
.
dat
$MYSQLD_DATADIR
/
test
/
Testbal
.
dat
SET
time_zone
=
'+00:00'
;
--
echo
#
--
echo
# Testing little endian table
--
echo
#
CREATE
TABLE
t1
(
fig
INT
(
4
)
NOT
NULL
FIELD_FORMAT
=
'C'
,
name
CHAR
(
10
)
NOT
NULL
,
birth
DATE
NOT
NULL
FIELD_FORMAT
=
'L'
,
id
CHAR
(
5
)
NOT
NULL
FIELD_FORMAT
=
'L2'
,
salary
DOUBLE
(
9
,
2
)
NOT
NULL
DEFAULT
0.00
FIELD_FORMAT
=
'LF'
,
dept
INT
(
4
)
NOT
NULL
FIELD_FORMAT
=
'L2'
)
ENGINE
=
CONNECT
TABLE_TYPE
=
BIN
BLOCK_SIZE
=
5
FILE_NAME
=
'Testbal.dat'
;
SELECT
*
FROM
t1
;
INSERT
INTO
t1
VALUES
(
5555
,
'RONALD'
,
'1980-02-26'
,
'3333'
,
4444.44
,
555
);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
fig
INT
(
4
)
NOT
NULL
FIELD_FORMAT
=
'C'
,
name
CHAR
(
10
)
NOT
NULL
,
birth
DATE
NOT
NULL
,
id
CHAR
(
5
)
NOT
NULL
FIELD_FORMAT
=
'S'
,
salary
DOUBLE
(
9
,
2
)
NOT
NULL
DEFAULT
0.00
FIELD_FORMAT
=
'F'
,
dept
INT
(
4
)
NOT
NULL
FIELD_FORMAT
=
'S'
)
ENGINE
=
CONNECT
TABLE_TYPE
=
BIN
BLOCK_SIZE
=
5
FILE_NAME
=
'Testbal.dat'
OPTION_LIST
=
'Endian=Little'
;
SELECT
*
FROM
t1
;
--
echo
#
--
echo
# Testing big endian table
--
echo
#
CREATE
TABLE
t2
(
fig
INT
(
4
)
NOT
NULL
FIELD_FORMAT
=
'C'
,
name
CHAR
(
10
)
NOT
NULL
,
birth
DATE
NOT
NULL
FIELD_FORMAT
=
'B'
,
id
CHAR
(
5
)
NOT
NULL
FIELD_FORMAT
=
'BS'
,
salary
DOUBLE
(
9
,
2
)
NOT
NULL
DEFAULT
0.00
FIELD_FORMAT
=
'BF'
,
dept
INT
(
4
)
NOT
NULL
FIELD_FORMAT
=
'B2'
)
ENGINE
=
CONNECT
TABLE_TYPE
=
BIN
BLOCK_SIZE
=
5
FILE_NAME
=
'Testbal.bin'
;
INSERT
INTO
t2
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
DROP
TABLE
t2
;
CREATE
TABLE
t2
(
fig
INT
(
4
)
NOT
NULL
FIELD_FORMAT
=
'C'
,
name
CHAR
(
10
)
NOT
NULL
,
birth
DATE
NOT
NULL
,
id
CHAR
(
5
)
NOT
NULL
FIELD_FORMAT
=
'S'
,
salary
DOUBLE
(
9
,
2
)
NOT
NULL
DEFAULT
0.00
FIELD_FORMAT
=
'F'
,
dept
INT
(
4
)
NOT
NULL
FIELD_FORMAT
=
'2'
)
ENGINE
=
CONNECT
TABLE_TYPE
=
BIN
BLOCK_SIZE
=
5
FILE_NAME
=
'Testbal.bin'
OPTION_LIST
=
'Endian=Big'
;
SELECT
*
FROM
t2
;
DROP
TABLE
t2
;
CREATE
TABLE
t2
(
fig
CHAR
(
4
)
NOT
NULL
,
name
CHAR
(
10
)
NOT
NULL
,
birth
DATE
NOT
NULL
,
id
SMALLINT
(
5
)
NOT
NULL
,
salary
DOUBLE
(
9
,
2
)
NOT
NULL
DEFAULT
0.00
FIELD_FORMAT
=
'F'
,
dept
SMALLINT
(
4
)
NOT
NULL
)
ENGINE
=
CONNECT
TABLE_TYPE
=
BIN
BLOCK_SIZE
=
5
FILE_NAME
=
'Testbal.bin'
OPTION_LIST
=
'Endian=Big'
;
SELECT
*
FROM
t2
;
DROP
TABLE
t2
;
CREATE
TABLE
t2
(
fig
INT
(
4
)
NOT
NULL
FIELD_FORMAT
=
'C'
,
name
CHAR
(
10
)
NOT
NULL
,
birth
DATE
NOT
NULL
FIELD_FORMAT
=
'B'
,
id
CHAR
(
5
)
NOT
NULL
FIELD_FORMAT
=
'BS'
,
salary
DOUBLE
(
9
,
2
)
NOT
NULL
DEFAULT
0.00
FIELD_FORMAT
=
'BF'
,
dept
SMALLINT
(
4
)
NOT
NULL
FIELD_FORMAT
=
'B'
)
ENGINE
=
CONNECT
TABLE_TYPE
=
BIN
BLOCK_SIZE
=
5
FILE_NAME
=
'Testbal.bin'
;
SELECT
*
FROM
t2
;
DROP
TABLE
t1
,
t2
;
#
# Clean up
#
--
remove_file
$MYSQLD_DATADIR
/
test
/
Testbal
.
dat
--
remove_file
$MYSQLD_DATADIR
/
test
/
Testbal
.
bin
storage/connect/mysql-test/connect/t/mysql_index.test
0 → 100644
View file @
0785b2d5
--
source
include
/
not_embedded
.
inc
#
# TODO: consider a possibility to run this test
# against some remote MySQL server
#
let
$PORT
=
`select @@port`
;
--
disable_query_log
--
replace_result
$PORT
PORT
--
error
0
,
ER_UNKNOWN_ERROR
--
eval
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
CONNECT
TABLE_TYPE
=
MYSQL
TABNAME
=
'tx1'
OPTION_LIST
=
'host=localhost,user=root,port=$PORT'
if
(
!
`SELECT count(*) FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'
AND ENGINE='CONNECT'
AND CREATE_OPTIONS LIKE '%`
table_type
`=MySQL%'`
)
{
Skip
Need
MySQL
support
;
}
DROP
TABLE
t1
;
--
enable_query_log
--
echo
#
--
echo
# Make remote table
--
echo
#
CREATE
TABLE
t1
(
id
int
(
11
)
NOT
NULL
,
msg
char
(
100
)
DEFAULT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
;
INSERT
INTO
t1
VALUES
(
1
,
'Un'
),(
3
,
'Trois'
),(
5
,
'Cinq'
);
INSERT
INTO
t1
VALUES
(
2
,
'Two'
),(
4
,
'Four'
),(
6
,
'Six'
);
SELECT
*
FROM
t1
;
--
echo
#
--
echo
# Make local MYSQL table with indexed id column
--
echo
#
CREATE
TABLE
t2
(
id
int
(
11
)
NOT
NULL
,
msg
char
(
100
)
DEFAULT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
CONNECT
DEFAULT
CHARSET
=
latin1
TABLE_TYPE
=
MYSQL
TABNAME
=
t1
;
--
echo
#
--
echo
# Testing SELECT, etc.
--
echo
#
SELECT
*
FROM
t2
;
SELECT
*
FROM
t2
WHERE
id
=
3
;
SELECT
*
FROM
t2
WHERE
id
IN
(
2
,
4
);
SELECT
*
FROM
t2
WHERE
id
IN
(
2
,
4
)
AND
msg
=
'Two'
;
SELECT
*
FROM
t2
WHERE
id
>
3
;
SELECT
*
FROM
t2
WHERE
id
>=
3
;
SELECT
*
FROM
t2
WHERE
id
<
3
;
SELECT
*
FROM
t2
WHERE
id
<
3
OR
id
>
4
;
SELECT
*
FROM
t2
WHERE
id
<=
3
;
SELECT
*
FROM
t2
WHERE
id
BETWEEN
3
AND
5
;
SELECT
*
FROM
t2
WHERE
id
>
2
AND
id
<
6
;
SELECT
*
FROM
t2
ORDER
BY
id
;
UPDATE
t2
SET
msg
=
'Five'
WHERE
id
=
5
;
SELECT
*
FROM
t2
;
DELETE
FROM
t2
WHERE
id
=
4
;
SELECT
*
FROM
t2
;
DROP
TABLE
t2
;
DROP
TABLE
t1
;
storage/connect/tabmysql.cpp
View file @
0785b2d5
...
@@ -1058,6 +1058,24 @@ bool TDBMYSQL::ReadKey(PGLOBAL g, OPVAL op, const void *key, int len)
...
@@ -1058,6 +1058,24 @@ bool TDBMYSQL::ReadKey(PGLOBAL g, OPVAL op, const void *key, int len)
{
{
bool
oom
;
bool
oom
;
int
oldlen
=
Query
->
GetLength
();
int
oldlen
=
Query
->
GetLength
();
PHC
hc
=
To_Def
->
GetHandler
();
if
(
op
==
OP_FIRST
&&
hc
->
end_range
)
{
#ifdef _DEBUG
assert
(
!
key
);
#endif
key_range
*
end_key
=
&
hc
->
save_end_range
;
key
=
end_key
->
key
;
len
=
end_key
->
length
;
switch
(
end_key
->
flag
)
{
case
HA_READ_BEFORE_KEY
:
op
=
OP_LT
;
break
;
case
HA_READ_AFTER_KEY
:
op
=
OP_LE
;
break
;
default:
key
=
NULL
;
}
// endswitch flag
}
// endif OP_FIRST
if
(
!
key
||
op
==
OP_NEXT
||
if
(
!
key
||
op
==
OP_NEXT
||
Mode
==
MODE_UPDATE
||
Mode
==
MODE_DELETE
)
{
Mode
==
MODE_UPDATE
||
Mode
==
MODE_DELETE
)
{
...
@@ -1069,22 +1087,12 @@ bool TDBMYSQL::ReadKey(PGLOBAL g, OPVAL op, const void *key, int len)
...
@@ -1069,22 +1087,12 @@ bool TDBMYSQL::ReadKey(PGLOBAL g, OPVAL op, const void *key, int len)
}
// endif key
}
// endif key
return
false
;
return
false
;
}
else
if
(
op
==
OP_FIRST
)
{
if
(
To_CondFil
)
{
oom
=
Query
->
Append
(
" WHERE "
);
if
((
oom
|=
Query
->
Append
(
To_CondFil
->
Body
)))
{
strcpy
(
g
->
Message
,
"Readkey: Out of memory"
);
return
true
;
}
// endif oom
}
// endif To_Condfil
}
else
{
}
else
{
if
(
Myc
.
m_Res
)
if
(
Myc
.
m_Res
)
Myc
.
FreeResult
();
Myc
.
FreeResult
();
To_Def
->
GetHandler
()
->
MakeKeyWhere
(
g
,
Query
,
op
,
'`'
,
key
,
len
);
if
(
hc
->
MakeKeyWhere
(
g
,
Query
,
op
,
'`'
,
key
,
len
))
return
true
;
if
(
To_CondFil
)
{
if
(
To_CondFil
)
{
oom
=
Query
->
Append
(
" AND ("
);
oom
=
Query
->
Append
(
" AND ("
);
...
...
storage/connect/tabodbc.cpp
View file @
0785b2d5
...
@@ -1268,9 +1268,10 @@ void ODBCCOL::ReadColumn(PGLOBAL g)
...
@@ -1268,9 +1268,10 @@ void ODBCCOL::ReadColumn(PGLOBAL g)
}
// endif Buf_Type
}
// endif Buf_Type
// Handle null values
// Nulls are handled by StrLen[n] == SQL_NULL_DATA
if
(
Value
->
IsZero
())
// MDEV-8561
Value
->
SetNull
(
Nullable
);
//if (Value->IsZero())
// Value->SetNull(Nullable);
if
(
trace
)
{
if
(
trace
)
{
char
buf
[
64
];
char
buf
[
64
];
...
...
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