Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View


Categories: connectors experimental galera main
Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

connectors experimental galera main
Sergei Golubchik
Merge https://github.com/drrtuy/duckdb-engine into 11.4
drrtuy
chore(): avoid compilation error for the fiber test TU.
drrtuy
chore(test): fix flacky cross_join_where test.
drrtuy
fix(cej): escape column names, remove bin objects from the repo, add tests.
LaGrunge
fix(decimal): map DECIMAL(>38) to DOUBLE, default use_double_for_decimal=TRUE

DDL: DECIMAL with precision >38 maps to DOUBLE when
use_double_for_decimal is ON (matching AliSQL default).

DML convertor: emit DOUBLE-formatted literals (%.17e) for precision >38
fields when use_double_for_decimal is ON, preventing DuckDB cast errors.

Change use_double_for_decimal default to TRUE (was FALSE, AliSQL
default is TRUE). Fix both MYSQL_SYSVAR_BOOL and config initializer.

Enable decimal_high_precision test. Enabled: 20 -> 21.
LaGrunge
feat(compat): add mid() UDF, CONVERT→CAST rewrite in pushdown

- mid(str, pos[, len]) via SQL macro delegating to DuckDB substr()
  (handles multibyte UTF-8 correctly)
- CONVERT(expr, TYPE) → CAST(expr AS TYPE) SQL rewrite in pushdown
  handler for MariaDB-specific syntax
- Remove mid SQL macros from duckdb_manager.cc

Tests progress:
- duckdb_string_func: past MID (line 212) to NOT REGEXP (line 226)
- duckdb_fix_sql: past CONVERT to DuckDB CAST type limitation
Sergei Golubchik
class != struct

error: struct 'THD' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
error: struct 'Item' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
LaGrunge
feat(compat): curdate/curtime macros, STRAIGHT_JOIN/index hints/LIMIT
rewrites, enable duckdb_sql_syntax test

- curdate()/curtime() macros → current_date/current_time
- STRAIGHT_JOIN → CROSS JOIN rewrite (before conditionless JOIN scan)
- Strip FORCE/USE/IGNORE INDEX(...) hints
- LIMIT offset,count → LIMIT count OFFSET offset
- Strip SQL_CALC_FOUND_ROWS and other SELECT hints
- addtime/subtime TIME overload: wrap around 24h for DuckDB range

Enable duckdb_sql_syntax test. Result diff: only ROLLUP grand total
row on empty table (+NULL,NULL,NULL — DuckDB SQL standard behavior)
and removed deprecation warnings.

Enabled: 23 -> 24.
Sergei Golubchik
change duckdb_query_udf to run_in_duckdb function plugin
LaGrunge
feat(compat): CURRENT_TIME(N)/CURRENT_DATE()/CURRENT_TIMESTAMP() rewrite,
curtime(fsp), datediff(d1,d2) macro

- Strip parens and args from CURRENT_TIME(N), CURRENT_DATE(),
  CURRENT_TIMESTAMP() — DuckDB uses keyword form without parens
- curtime(fsp) macro: accept optional fractional seconds precision arg
- datediff(d1, d2) macro: d1::DATE - d2::DATE (MariaDB 2-arg form)

duckdb_time_func progresses: line 45 → 155 (of 847).
Next blocker: DATEDIFF(TIMESTAMP, TIME) — DuckDB can't cast TIME→DATE.
drrtuy
feat(runtime): fiber runtime based on ASM borrowed from libmariadb + custom select_result_interceptor for DuckDB.
drrtuy
chore(build) preparation for code refactoring.
LaGrunge
feat(compat): improve bin/oct for string args, add hex(numeric), locate macro

- bin()/oct(): handle empty regexp match (non-numeric strings → 0)
- hex(BIGINT), hex(DOUBLE): C++ UDF overloads for numeric types
  (DuckDB builtin hex only accepts VARCHAR/BLOB)
- locate(needle, haystack[, pos]): SQL macro wrapping DuckDB instr()
  with reversed argument order (note: 2-arg overloaded by 3-arg)

Tests progress: duckdb_string_func past BIN/HEX to LOCATE (needs C++
UDF for overloading), duckdb_fix_sql past hex to CONVERT (MariaDB
syntax).

TODO: hex/oct/bin with values > 2^63 need hugeint support.
Sergei Golubchik
Merge https://github.com/mariadb/duckdb-engine into 11.4
Sergei Golubchik
improve ExternalProject

* don't bother merging libraries
* gitignore the build dir
* prefix dir = build dir
* produce the progress log while building
Sergei Golubchik
add submodule, most-merge fixes
LaGrunge
feat(compat): override length(VARCHAR) and ascii(VARCHAR) for MariaDB
byte semantics, enable duckdb_string_func test

Add C++ UDF overloads via ALTER_ON_CONFLICT:
- length(VARCHAR) → byte count (was: DuckDB char count)
- ascii(VARCHAR) → first byte value (was: DuckDB Unicode codepoint)

This matches MariaDB LENGTH()/ASCII() semantics for pushdown queries.

Result diff reviewed:
- Warnings removed (DuckDB doesn't emit truncation warnings)
- REGEXP_LIKE/multi-arg REGEXP_* sections removed (MySQL 8.0 only)
- ORD() for multibyte: 15111600→25968 (MariaDB multibyte ORD vs
  DuckDB Unicode codepoint — minor, TODO)

Enabled: 22 -> 23.
drrtuy
chore(build): refactor code breaking it into separate modules.
drrtuy
chore(): docs updates based on the recent changes.
LaGrunge
feat(pushdown): add CROSS JOIN, REGEXP, NOT REGEXP rewrites + mid UDF

SQL rewrites in pushdown handler:
- Conditionless JOIN → CROSS JOIN (scan for ON/USING before boundary)
- expr REGEXP pattern → expr ~ pattern (DuckDB regex operator)
- expr NOT REGEXP pattern → expr !~ pattern

mid(str, pos[, len]) implemented as SQL macro delegating to DuckDB
substr() for proper UTF-8 multibyte handling.

Tests progress:
- duckdb_sql_syntax: past JOIN to HIGH_PRIORITY (line 34)
- duckdb_string_func: past REGEXP to REGEXP_INSTR (line 302)
Sergei Golubchik
duckdb-engine rpm/deb fixes

no additional depencenies = server component
drrtuy
chore(): update documentation.
drrtuy
chore(build): install build dependencies in build.sh.
LaGrunge
feat(compat): implement regexp_instr, regexp_replace, regexp_substr,
json_unquote using RE2 directly

Instead of calling MariaDB Item_func_* classes (which require
current_thd unavailable in DuckDB worker threads), implement
regex functions using DuckDB's bundled RE2 library directly:
- regexp_instr(str, pattern) → position of first match
- regexp_replace(str, pattern, repl) → RE2::GlobalReplace
- regexp_substr(str, pattern) → first matching substring
- json_unquote(str) → strip JSON quotes and unescape

Add DuckDB third_party/re2 to include path in cmake.

duckdb_string_func progresses past REGEXP_INSTR to test issue
(MariaDB 11.4 doesn't support 3-arg REGEXP_INSTR).
drrtuy
fix(pushdown): skip-list of all escaped strings to avoid SQL expressions lookup in those.
LaGrunge
feat(compat): addtime/subtime C++ UDFs, convert_tz macro, LIMIT and
SELECT hints rewrite

- addtime/subtime: C++ UDFs parsing MariaDB interval format
  'D H:M:S.us', with TIMESTAMP and TIME overloads (TIME wraps 24h)
- convert_tz(ts, from, to): macro via DuckDB timezone()
- Remove MariaDB SELECT hints: HIGH_PRIORITY, SQL_NO_CACHE,
  SQL_SMALL_RESULT, SQL_BIG_RESULT, SQL_CALC_FOUND_ROWS, STRAIGHT_JOIN
- Rewrite LIMIT offset,count → LIMIT count OFFSET offset

Tests progress:
- duckdb_time_func: past addtime to CONVERT_TZ (line 60)
- duckdb_sql_syntax: past hints to LIMIT syntax (line 47)
drrtuy
fix(build): now DuckDB core extensions are statically linked instead auto-loaded.
LaGrunge
fix(rebase issues): Some tests are broken now, a big thanx
Sergei Golubchik
correct duckdb engine maturity for a first release

and fix the version
LaGrunge
feat(compat): port full hex/oct/bin from AliSQL, add locate C++ UDF

Port production-quality hex/oct/bin scalar functions from AliSQL DuckDB
fork. Supports all numeric types including HUGEINT (no precision loss
for large decimals), VARCHAR (parse as double), DOUBLE/FLOAT (round
first), BLOB (hex encoding). Replaces previous SQL macros.

Add locate(needle, haystack) and locate(needle, haystack, pos) as
native C++ scalar functions with proper 2-arg and 3-arg overloads.

Remove oct/bin/locate SQL macros from duckdb_manager.cc — now handled
by C++ UDFs in duckdb_mysql_compat.cc.

Tests progress: duckdb_string_func past LOCATE/BIN/HEX to MID (line
212), duckdb_fix_sql past hex(decimal) to CONVERT (line 53).
drrtuy
Expose static symbols leveraged in DuckDB to stringify WHERE conditions for other MariaDB engines.
Sergei Golubchik
don't modify server's error messages
drrtuy
fix(cej): WHERE predicate now does not contain alias or table name in column idents.
drrtuy
fix(mtr): trim couple tests to pass on U24.04.
LaGrunge
fix(mtr): add have_duckdb.inc and max_allowed_packet to feature_duckdb_data_type

Decimal >38 is now fixed (DDL→DOUBLE). Test progresses past line 74 to
line 144 where it hits octet_length(VARCHAR) — DuckDB builtin lacks
VARCHAR overload. Cannot be fixed via macro (infinite recursion on
builtin override). Needs SQL rewrite in pushdown.

Test remains disabled but now only blocked by octet_length issue.
drrtuy
fix(pushdown): fix for STRAIGHT_JOIN, various JOIN re-write cases and also recursive cases WITH ROLLUP and LIMIT clauses.
drrtuy
fix(build):thread local maps with default TLS model got broken with MSAN build.
LaGrunge
feat(compat): add strcmp, substring_index, to_base64 macros, RLIKE
rewrite, adapt test for MariaDB 11.4

New SQL macros: strcmp(a,b), substring_index(s,d,c), to_base64(x).
Add RLIKE/NOT RLIKE → ~/!~ rewrite alongside REGEXP.

Adapt duckdb_string_func test:
- Comment out REGEXP_LIKE section (MySQL 8.0 only)
- Comment out multi-arg REGEXP_INSTR/REPLACE/SUBSTR (MySQL 8.0 only)

Test runs to completion but has semantic differences:
- LENGTH() returns chars in DuckDB vs bytes in MariaDB
- ASCII() returns codepoint in DuckDB vs first byte in MariaDB
Needs LENGTH/ASCII UDF overloads for byte semantics.
drrtuy
feat(cej): MDB tables scan now uses mysql_execute_command to to leverage optimizer and various access paths for a scan.
LaGrunge
feat(udf): register native DuckDB scalar function overloads for MariaDB compat

Add duckdb_mysql_compat.cc with C++ DuckDB scalar functions:
- octet_length(VARCHAR) → BIGINT: DuckDB builtin only has BLOB overload
- length(BLOB) → BIGINT: DuckDB builtin only has VARCHAR overload
- json_contains(VARCHAR,VARCHAR,VARCHAR) → BOOL: 3-arg placeholder

These are registered via Catalog::CreateFunction with
ALTER_ON_CONFLICT to add overloads alongside existing builtins,
avoiding the infinite recursion problem of SQL macros.

Enable feature_duckdb_data_type test. Result diff reviewed:
- UNSIGNED decimal warnings removed (MariaDB 11.4 change)
- Decimal >38 shown as full values instead of scientific notation
- datetime(6) microsecond precision improved (DuckDB v1.5.2)
- JSON formatting: no space after colon (DuckDB v1.5.2)

Enabled: 21 -> 22.