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

Make default character set consistent #233

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ env:
global:
- MDBSOCKET=/var/run/mysqld/mysqld.sock
matrix:
- DB=mariadb:10.1 JSON_SUPPORT=false
- DB=mariadb:10.2 JSON_SUPPORT=false
- DB=mariadb:10.3 JSON_SUPPORT=false GEOMETRY_SUPPORT=false
- DB=mysql:8.0 JSON_SUPPORT=true
- DB=mysql:5.7 JSON_SUPPORT=true
- DB=mysql:5.6 JSON_SUPPORT=false
- DB=mariadb:10.1 JSON_SUPPORT=false MYSQL_EXTRA_ARGS=""
- DB=mariadb:10.2 JSON_SUPPORT=false MYSQL_EXTRA_ARGS=""
- DB=mariadb:10.3 JSON_SUPPORT=false GEOMETRY_SUPPORT=false MYSQL_EXTRA_ARGS=""
- DB=mysql:8.0 JSON_SUPPORT=true MYSQL_EXTRA_ARGS="--default_authentication_plugin=mysql_native_password"
- DB=mysql:5.7 JSON_SUPPORT=true MYSQL_EXTRA_ARGS=""
- DB=mysql:5.6 JSON_SUPPORT=false MYSQL_EXTRA_ARGS=""
matrix:
include:
- elixir: 1.4.5
otp_release: 19.3
env: DB=mysql:8.0 JSON_SUPPORT=true
env: DB=mysql:8.0 JSON_SUPPORT=true MYSQL_EXTRA_ARGS="--default_authentication_plugin=mysql_native_password"
- elixir: 1.5.1
otp_release: 19.3
env: DB=mysql:5.7 JSON_SUPPORT=true
Expand All @@ -38,5 +38,5 @@ matrix:
before_install:
- sudo service mysql stop
- docker pull $DB || true
- docker run --name mariadb -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -d $DB
- docker run --name mariadb -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -d $DB $MYSQL_EXTRA_ARGS
script: "JSON_SUPPORT=$JSON_SUPPORT mix test --cover"
4 changes: 2 additions & 2 deletions lib/mariaex/protocol.ex
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ defmodule Mariaex.Protocol do
defp handle_handshake(packet(seqnum: seqnum) = packet, opts, %{ssl_conn_state: :ssl_handshake} = s) do
# Create and send an SSL request packet per the spec:
# https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::SSLRequest
msg = ssl_connection_request(capability_flags: ssl_capabilities(opts), max_size: @maxpacketbytes, character_set: 8)
msg = ssl_connection_request(capability_flags: ssl_capabilities(opts), max_size: @maxpacketbytes, character_set: 33)
msg_send(msg, s, new_seqnum = seqnum + 1)
case upgrade_to_ssl(s, opts) do
{:ok, new_state} ->
Expand All @@ -212,7 +212,7 @@ defmodule Mariaex.Protocol do
{database, capabilities} = capabilities(opts)
msg = handshake_resp(username: :unicode.characters_to_binary(opts[:username]), password: scramble,
database: database, capability_flags: capabilities,
max_size: @maxpacketbytes, character_set: 8)
max_size: @maxpacketbytes, character_set: 33)
msg_send(msg, s, seqnum + 1)
handshake_recv(%{s | state: :handshake_send, deprecated_eof: deprecated_eof}, nil)
end
Expand Down