mariadb/mysql-test/suite/s3/clone.test
Monty ce4f83e6b9 MDEV-29157 SELECT using ror_merged scan fails with s3 tables
handler::clone() call did not work with read only tables like S3.
It gave a wrong error message (out of memory instead of a permission
error) and aborted the query.

The issue was that the clone call had a wrong parameter to ha_open().
This now fixed. I also changed the clone call to provide the correct
error message if things fails.

This patch fixes an 'out of memory' error when using the S3 engine
for queries that could use multiple indexes together to find the matching
rows, like the following:
SELECT * FROM t1 WHERE key1 = 99 OR key2 = 2
2025-06-02 14:02:53 +03:00

14 lines
385 B
Text

--source include/have_s3.inc
--source include/have_sequence.inc
--source include/have_innodb.inc
--echo #
--echo # SELECT using ror_merged scan fails with s3 tables
--echo #
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT, b INT, KEY(a), KEY(b)) ENGINE=Aria;
INSERT INTO t1 VALUES (0,0),(0,10),(3,10);
ALTER TABLE t1 ENGINE=S3;
SELECT * FROM t1 WHERE a = 99 OR b = 2;
DROP TABLE t1;