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
75e3c304
Commit
75e3c304
authored
Oct 01, 2024
by
Yuchen Pei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-26345 [debug] some tmp changes to fix
parent
a60d7b11
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
3 deletions
+20
-3
storage/spider/mysql-test/spider/bugfix/r/mdev_26345.result
storage/spider/mysql-test/spider/bugfix/r/mdev_26345.result
+2
-2
storage/spider/mysql-test/spider/bugfix/t/mdev_26345.test
storage/spider/mysql-test/spider/bugfix/t/mdev_26345.test
+1
-1
storage/spider/spd_db_include.h
storage/spider/spd_db_include.h
+1
-0
storage/spider/spd_db_mysql.cc
storage/spider/spd_db_mysql.cc
+16
-0
No files found.
storage/spider/mysql-test/spider/bugfix/r/mdev_26345.result
View file @
75e3c304
...
...
@@ -10,10 +10,10 @@ OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
create table t2 (a int, b int, PRIMARY KEY (a, b));
create table t1 (a int, b int, PRIMARY KEY (a, b)) ENGINE=Spider
COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
insert into t1 VALUES (1,
1
), (1,2), (2,11);
insert into t1 VALUES (1,
4
), (1,2), (2,11);
SELECT MIN(b), a FROM t1 WHERE a=1;
MIN(b) a
1
1
2
1
SELECT MAX(b), a FROM t1 WHERE a<3;
MAX(b) a
11 1
...
...
storage/spider/mysql-test/spider/bugfix/t/mdev_26345.test
View file @
75e3c304
...
...
@@ -18,7 +18,7 @@ create table t2 (a int, b int, PRIMARY KEY (a, b));
create
table
t1
(
a
int
,
b
int
,
PRIMARY
KEY
(
a
,
b
))
ENGINE
=
Spider
COMMENT
=
'WRAPPER "mysql", srv "srv",TABLE "t2"'
;
insert
into
t1
VALUES
(
1
,
1
),
(
1
,
2
),
(
2
,
11
);
insert
into
t1
VALUES
(
1
,
4
),
(
1
,
2
),
(
2
,
11
);
SELECT
MIN
(
b
),
a
FROM
t1
WHERE
a
=
1
;
SELECT
MAX
(
b
),
a
FROM
t1
WHERE
a
<
3
;
...
...
storage/spider/spd_db_include.h
View file @
75e3c304
...
...
@@ -1764,6 +1764,7 @@ typedef struct st_spider_result_list
volatile
#endif
SPIDER_RESULT
*
current
;
MY_BITMAP
skip
;
KEY
*
key_info
;
int
key_order
;
spider_string
*
sqls
;
...
...
storage/spider/spd_db_mysql.cc
View file @
75e3c304
...
...
@@ -342,6 +342,15 @@ SPIDER_DBTON spider_dbton_mariadb = {
SPIDER_MATURITY_STABLE
};
void
spider_db_mbase_row
::
skip
(
MY_BITMAP
*
map
)
{
for
(
uint
i
=
0
,
j
=
0
;
j
<
field_count
;
j
++
)
{
if
(
!
bitmap_is_set
(
map
,
j
))
row
[
i
++
]
=
row
[
j
];
}
}
spider_db_mbase_row
::
spider_db_mbase_row
(
uint
dbton_id
)
:
spider_db_row
(
dbton_id
),
...
...
@@ -13975,8 +13984,15 @@ int spider_mbase_handler::append_list_item_select(
DBUG_ENTER
(
"spider_mbase_handler::append_list_item_select"
);
DBUG_PRINT
(
"info"
,(
"spider this=%p"
,
this
));
begin
=
str
->
length
();
uint
i
=
-
1
;
while
((
item
=
it
++
))
{
i
++
;
if
(
item
->
const_item
())
{
bitmap_set_bit
(
&
spider
->
result_list
.
skip
,
i
);
continue
;
}
if
(
skip
>
0
)
{
str
->
reserve
(
2
);
...
...
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