今年の冬はお家ベンチマーク環境を暖房にする気持ちでベンチマークをやっていこうと思う。
まずは環境構築から。
環境
[さらに読む]MySQL Release note でわいわい言う勉強会 8.0.22 でLTしてきました。
MySQL Shell の dumpInstance の仕組み
MySQL Shell のバックアップ機能 dumpInstance
がどのようにして、一貫性のあるバックアップを実現しているか説明しました。 8.0.21 までは FLUSH
TALBES WITH READ LOCK
を利用してロックをかける方式のみでしたが、 8.0.22
以降では、FTWRLが使えない場合は、LOCK TABLES
を代替として利用するようになっています。
MySQL Shell dumpInstance の仕組み from …
[さらに読む]MySQL 8.0.22 の新機能で DNS SRV レコードのサポートというのがあったので試してみた。 https://dev.mysql.com/doc/refman/8.0/en/connecting-using-dns-srv.html
MySQLサーバー3台 (a.example.com, b.example.com, c.example.com)とそれに接続するためのクライアントの計4台を docker-compose で作成する。
Dockerfile
FROM ubuntu RUN apt update RUN apt install -y mysql-client libmysqlclient-dev gcc unbound bind9-dnsutils RUN rm -f /etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf COPY entrypoint.sh / RUN chmod +x /entrypoint.sh ENTRYPOINT /entrypoint.sh
docker-compose.yml
services: client: build: . hostname: client volumes: - ./resolv.conf:/etc/resolv.conf - ./unbound-example.conf:/etc/unbound/unbound.conf.d/example.conf - .:/work …[さらに読む]
MySQL 8.0.22 のリリースノートによるとプリペアドステートメントまわりに非互換があるらしい。
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-22.html
For a prepared statement of the form SELECT expr1, expr2, ... FROM table ORDER BY ?, passing an integer value N for the parameter no longer causes ordering of the results by the Nth expression in the select list; the results are no longer ordered, as is expected with ORDER BY constant.
order by
の引数をプレースホルダで与えても無視されるらしい。
試してみる。
8.0.21:
% docker run -p 13306:3306 --name mysql8021 -d -e MYSQL_ALLOW_EMPTY_PASSWORD=1 mysql:8.0.21 % docker exec -it mysql8021 mysql mysql> create database test; mysql> use test; mysql> create table t (id int …[さらに読む]
MySQL 8.0.22 がリリースされたので、恒例の 「MySQL リリースノートでわいわい言う勉強会」通称 Myリノベ を開催しました。最近のMySQLは年4回(1月、4月、7月、10月)にリリースされるサイクルになっているので、特に緊急の問題が発生しない限りは、これが2020年最後のリリースとなります。mysql.connpass.com Myリノベが「恒例」と言っても、今回が3回目なんですけどね。いつも、参加のみなさんに盛り上げていただいています。ありがとうございます。まだまだより良い進行方法を模索している段階で、今回は進行役としてなるべく喋らない(もちろんイチ参加者としては喋る!)こ…
概要
8.0.22のリリースノートを見るとprepared statementの挙動が変わっているらしい。
特にこれが気になったので、試してみる
For a prepared statement of the form SELECT expr1, expr2, ... FROM table ORDER BY ?, passing an integer value N for the parameter no longer causes ordering of the results by the Nth expression in the select list; the results are no longer ordered, as is expected with ORDER BY constant.
どうやら8.0.22からはSELECT expr1, expr2, ... FROM table ORDER BY ? といったクエリをprepareして、placeholderにselect listの番号を表す数値Nを指定する場合にsortが効かなくなるらしい
実験
8.0.21, …
[さらに読む]