Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absorb patches, move to duckdb's main #67

Merged
merged 6 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions .github/workflows/MainDistributionPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,17 @@ jobs:
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
with:
extension_name: mysql_scanner
duckdb_version: 'v0.10.2'
exclude_archs: 'osx_amd64;osx_arm64;wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools'
duckdb_version: main
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools'
build_duckdb_shell: false

# Note: this workaround is required for building MacOS where extra toolchain config is required
duckdb-stable-build-macos:
name: Build extension binaries
uses: ./.github/workflows/_extension_distribution_macos.yml
with:
duckdb_version: v0.10.2
extension_name: mysql_scanner


duckdb-stable-deploy:
name: Deploy extension binaries
needs: [duckdb-stable-build, duckdb-stable-build-macos]
needs: duckdb-stable-build
uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@main
secrets: inherit
with:
duckdb_version: v0.10.2
duckdb_version: main
extension_name: mysql_scanner
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools'
deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
5 changes: 1 addition & 4 deletions .github/workflows/MysqlTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: '3.11'

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11.1
Expand All @@ -70,9 +70,6 @@ jobs:
- name: Build extension
shell: bash
run: |
# needed for MySQL cross compilation - see https://mariadb.com/kb/en/cross-compiling-mariadb/
echo 'SET(STACK_DIRECTION -1)' >> ${VCPKG_TOOLCHAIN_PATH}
echo 'SET(HAVE_IB_GCC_ATOMIC_BUILTINS 0)' >> ${VCPKG_TOOLCHAIN_PATH}
make release
- name: Test Extension
Expand Down
134 changes: 0 additions & 134 deletions .github/workflows/_extension_distribution_macos.yml

This file was deleted.

2 changes: 1 addition & 1 deletion duckdb
Submodule duckdb updated 1058 files
1 change: 1 addition & 0 deletions src/include/mysql_connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#pragma once

#include "duckdb/common/shared_ptr.hpp"
#include "mysql_utils.hpp"
#include "mysql_result.hpp"

Expand Down
2 changes: 1 addition & 1 deletion src/include/mysql_scanner_extension.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

using namespace duckdb;

class MySQLScannerExtension : public Extension {
class MysqlScannerExtension : public Extension {
public:
std::string Name() override {
return "mysql_scanner";
Expand Down
2 changes: 1 addition & 1 deletion src/include/storage/mysql_table_entry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class MySQLTableEntry : public TableCatalogEntry {

TableStorageInfo GetStorageInfo(ClientContext &context) override;

void BindUpdateConstraints(LogicalGet &get, LogicalProjection &proj, LogicalUpdate &update,
void BindUpdateConstraints(Binder &binder, LogicalGet &get, LogicalProjection &proj, LogicalUpdate &update,
ClientContext &context) override;
};

Expand Down
2 changes: 1 addition & 1 deletion src/mysql_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ MySQLConnection &MySQLConnection::operator=(MySQLConnection &&other) noexcept {

MySQLConnection MySQLConnection::Open(const string &connection_string) {
MySQLConnection result;
result.connection = make_shared<OwnedMySQLConnection>(MySQLUtils::Connect(connection_string));
result.connection = make_shared_ptr<OwnedMySQLConnection>(MySQLUtils::Connect(connection_string));
result.dsn = connection_string;
result.Execute("SET character_set_results = 'utf8mb4';");
return result;
Expand Down
2 changes: 1 addition & 1 deletion src/mysql_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static void LoadInternal(DatabaseInstance &db) {
config.optimizer_extensions.push_back(std::move(mysql_optimizer));
}

void MySQLScannerExtension::Load(DuckDB &db) {
void MysqlScannerExtension::Load(DuckDB &db) {
LoadInternal(*db.instance);
}

Expand Down
2 changes: 1 addition & 1 deletion src/storage/mysql_table_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ unique_ptr<BaseStatistics> MySQLTableEntry::GetStatistics(ClientContext &context
return nullptr;
}

void MySQLTableEntry::BindUpdateConstraints(LogicalGet &, LogicalProjection &, LogicalUpdate &, ClientContext &) {
void MySQLTableEntry::BindUpdateConstraints(Binder &binder, LogicalGet &, LogicalProjection &, LogicalUpdate &, ClientContext &) {
}

TableFunction MySQLTableEntry::GetScanFunction(ClientContext &context, unique_ptr<FunctionData> &bind_data) {
Expand Down
4 changes: 3 additions & 1 deletion test/sql/test_case_insensitivity.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

require mysql_scanner

require-env MYSQL_TEST_DATABASE_AVAILABLErequire-env POSTGRES_TEST_DATABASE_AVAILABLE
require-env MYSQL_TEST_DATABASE_AVAILABLE

require-env POSTGRES_TEST_DATABASE_AVAILABLE

statement ok
ATTACH 'host=localhost user=root port=0 database=mysqlscanner' AS s (TYPE MYSQL_SCANNER)
Expand Down
12 changes: 4 additions & 8 deletions vcpkg_ports/libmysql/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,18 @@ endif()

set(CROSS_COMPILING "")
set(STACK_DIRECTION "")
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
if(NOT VCPKG_TARGET_IS_WINDOWS)
set(STACK_DIRECTION -DSTACK_DIRECTION=-1)
else()
# ARM builds are always cross compiled
set(HAVE_IB_GCC_ATOMIC_BUILTINS 0)
set(CROSS_COMPILING -DCMAKE_CROSSCOMPILING=1)
# Non-Windows builds are always cross-compiled
# as such we build the executables (comp_sql, uca9dump, comp_client_err) separately
set(PATCH_FILES
${PATCH_FILES}
remove_executables.patch
)
if(VCPKG_TARGET_IS_LINUX)
set(CROSS_COMPILING -DCMAKE_CROSSCOMPILING=1)
set(STACK_DIRECTION -DSTACK_DIRECTION=-1)
endif()
endif()


vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mysql/mysql-server
Expand Down
Loading