elixir-ecto / myxql

MySQL 5.5+ driver for Elixir
Apache License 2.0
273 stars 67 forks source link

test query non preparable statement (MyXQLTest) failed on MariaDB >= 10.6 #190

Closed kianmeng closed 3 months ago

kianmeng commented 3 months ago

Changes made to docker-compose.yml:

+
+  mariadb-10.6:
+    image: "docker.io/mariadb:10.6"
+    ports:
+      - "10004:3306"
+    environment:
+      - MYSQL_ALLOW_EMPTY_PASSWORD=1
docker-compose up --force-recreate mariadb-10.6
MYSQL_UNIX_PORT=/var/run/mysqld/mysqld.sock ./scripts/test-versions.sh mariadb-10.6
$ MYSQL_UNIX_PORT=/var/run/mysqld/mysqld.sock ./scripts/test-versions.sh mariadb-10.6
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
mariadb-10.6
    warning: :public_key.encrypt_public/3 is deprecated. Do not use
    │
 28 │     :public_key.encrypt_public(xor, public_key, rsa_pad: :rsa_pkcs1_oaep_padding)
    │                 ~
    │
    └─ lib/myxql/protocol/auth.ex:28:17: MyXQL.Protocol.Auth.encrypt_sha_password/3

Running ExUnit with seed: 514792, max_cases: 24
Excluding tags: [timestamp_precision: false, geometry: false, json: true, public_key_exchange: true, ssl: true, requires_otp_19: false, sha256_password: true, caching_sha2_password: true]

............................**.......................................................

  1) test query non preparable statement (MyXQLTest)
     test/myxql_test.exs:140
     match (=) failed
     code:  assert {:error, %MyXQL.Error{mysql: %{code: 1295}}} =
              MyXQL.query(c.conn, "BEGIN", [], query_type: :binary, log: log)
     left:  {:error, %MyXQL.Error{mysql: %{code: 1295}}}
     right: {:ok, %MyXQL.Result{columns: nil, connection_id: 742, last_insert_id: 0, num_rows: 0, num_warnings: 0, rows: nil}}
     stacktrace:
       test/myxql_test.exs:149: (test)

.................................................................................................................
Finished in 18.4 seconds (18.0s async, 0.4s sync)
219 tests, 1 failure, 20 excluded, 2 skipped

I have also tested with default MariaDB on Ubuntu 24.04:

mariadb --version
mariadb  Ver 15.1 Distrib 10.11.8-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper