Skip to content
/ server Public

Commit 068a095

Browse files
YoungHypogrooverdan
authored andcommitted
MDEV-36737: Research and Estimation for Adapting VIDEX to MariaDB
VIDEX is a Disaggregated and Extensible Virtual Index Engine designed to perform efficient and accurate what-if analysis for tasks such as index recommendation. Fix template linking error for gcc debian: Add packaging for the VIDEX plugin This commit adds the necessary files to build `mariadb-plugin-videx` as a separate Debian package. - Add `COMPONENT videx-engine` to CMakeLists.txt to register the plugin. - Define the `mariadb-plugin-videx` package in debian/control. - Create `debian/mariadb-plugin-videx.install` to include the plugin .so and .cnf files. debian: fix indent in debian/control fix bugs from empty table videx: fix RPM autobake by adding CPACK summary/description
1 parent 4a01157 commit 068a095

File tree

13 files changed

+1805
-0
lines changed

13 files changed

+1805
-0
lines changed

debian/control

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,17 @@ Description: Snappy compression support in the server and storage engines
12061206
Note that these affect InnoDB and Mroonga only;
12071207
RocksDB still uses the compression algorithms from its own library
12081208

1209+
Package: mariadb-plugin-videx
1210+
Architecture: any
1211+
Depends: mariadb-server (= ${server:Version}),
1212+
${misc:Depends},
1213+
${shlibs:Depends}
1214+
Description: Virtual index engine for what-if analysis in MariaDB
1215+
The VIDEX storage engine allows developers and DBAs to perform what-if
1216+
analysis by evaluating the impact of potential indexes on query plans.
1217+
It simulates the cost and behavior of engines like InnoDB without requiring
1218+
the indexes to be physically built, saving significant time and resources.
1219+
12091220
Package: mariadb-test
12101221
Architecture: any
12111222
Depends: libnet-ssleay-perl,
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
etc/mysql/mariadb.conf.d/videx.cnf
2+
usr/lib/mysql/plugin/ha_videx.so

storage/videx/CMakeLists.txt

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Copyright (c) 2025 Bytedance Ltd. and its affiliates.
2+
#
3+
# This program is free software; you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License, version 2.0,
5+
# as published by the Free Software Foundation.
6+
#
7+
# This program is also distributed with certain software (including
8+
# but not limited to OpenSSL) that is licensed under separate terms,
9+
# as designated in a particular file or component or in included license
10+
# documentation. The authors of MySQL hereby grant you an additional
11+
# permission to link the program and your derivative works with the
12+
# separately licensed software that they have included with MySQL.
13+
#
14+
# This program is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License, version 2.0, for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, write to the Free Software
21+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22+
23+
# Check necessary dependencies
24+
FIND_PACKAGE(CURL)
25+
IF(NOT CURL_FOUND)
26+
MESSAGE(STATUS "CURL not found. VIDEX will not be compiled")
27+
RETURN()
28+
ENDIF()
29+
30+
SET_PACKAGE_PROPERTIES(CURL PROPERTIES TYPE REQUIRED)
31+
SET(CPACK_RPM_videx-engine_PACKAGE_SUMMARY "VIDEX AI-enhanced virtual index engine for MariaDB" PARENT_SCOPE)
32+
SET(CPACK_RPM_videx-engine_PACKAGE_DESCRIPTION "VIDEX enables What-If Analysis via virtual indexes to simulate
33+
query plans, forwarding requests via HTTP to external AI servers for enhanced cost estimation." PARENT_SCOPE)
34+
35+
INCLUDE_DIRECTORIES(
36+
${CMAKE_SOURCE_DIR}/sql
37+
${CMAKE_SOURCE_DIR}/include
38+
${CURL_INCLUDE_DIRS}
39+
${ZLIB_INCLUDE_DIRS}
40+
)
41+
42+
SET(VIDEX_SOURCES
43+
videx_utils.cc
44+
ha_videx.cc
45+
)
46+
47+
MYSQL_ADD_PLUGIN(videx
48+
${VIDEX_SOURCES}
49+
STORAGE_ENGINE
50+
LINK_LIBRARIES ${ZLIB_LIBRARIES} ${CURL_LIBRARIES}
51+
COMPONENT videx-engine
52+
)

0 commit comments

Comments
 (0)