3135 件中 1381 - 1390 件を表示
« 前の 10 件 | 次の 10 件 »
MySQL 5.7でやっと(?)1テーブル複数トリガーが仕掛けられるようになった

As of MySQL 5.7.2, it is possible to define multiple triggers for a given table that have the same trigger event and action time. For example, you cannot have two BEFORE UPDATE triggers for a table. By default, triggers that have the same trigger event and action time activate in the order they were created. To affect trigger order, specify a trigger_order clause that indicates FOLLOWS or PRECEDES and the name of an existing trigger that also has the same trigger event and action time. With FOLLOWS, the new trigger activates after the existing trigger. With PRECEDES, the new trigger activates before the existing trigger.MySQL :: MySQL 5.7 Reference Manual :: 13.1.16 CREATE TRIGGER Syntax


試してみよう。

5.6のフツーの動作は

mysql56> CREATE TRIGGER before_insert_1 BEFORE INSERT ON t1 …
[さらに読む]
2015年版 InnoDB Monitorの仲間たち(InnoDBエンジン本体のアレ)

日々の覚書: InnoDB Monitorの仲間たち(InnoDBエンジン本体のアレ) で"CREATE TABLE innodb_monitor .."的なものを紹介しました。あれから2年。

というかよく調べてみたら1年前。

MySQL :: MySQL 5.7 Release Notes :: Changes in MySQL 5.7.4 (2014-03-31, Milestone 14)

InnoDB: New global configuration parameters, innodb_status_output and innodb_status_output_locks, allow you to dynamically enable and disable the standard InnoDB Monitor and InnoDB Lock Monitor for periodic output. Previously, enabling and disabling these monitors for periodic output required creating and dropping specially named tables (innodb_monitor and innodb_lock_monitor). For additional information, see …

[さらに読む]
MySQLのPerformance Schemaでsetup_actorsに除外条件を設定する

免責事項 * この翻訳は MySQL Server Blogの記事をユーザーが翻訳したものであり、Oracle公式の翻訳ではありません。

  • Performance Schemasetup_actors はどのユーザーやどのホストからの接続のinstrumentation(訳注: Performance Schemaで統計情報を取得中のスレッドのステータス)を有効化するのかを指定するのに使う。デフォルトでは全てのホストからの全ての接続でinstrumentationが有効化される。

    mysql> select * from performanceschema.setupactors;
    +------+------+------+
    | HOST | USER | ROLE |
    +------+------+------+
    | %    | %    | %    |
    +------+------+------+
    1 row in set …
[さらに読む]
MySQL 5.7.6のgenerated columnは関数インデックスの夢を見るか

MySQL 5.7.6-m16で導入されたgenerated columnについてメモ。タイトルでしゃらっと関数インデックスとか言っているけれど、俺はその機能を知らない。

MySQL :: MySQL 5.7 Reference Manual :: 13.1.14 CREATE TABLE Syntax

generated columnはあるカラムの値に関数を噛ませた結果をカラムとして実体化できたり、実体化せずに毎回計算できたりするカラム定義のことらしくて、


mysql57> CREATE TABLE t1 (num int, val varchar(32)) Engine = MyISAM;
Query OK, 0 rows affected (0.01 sec)

mysql57> INSERT INTO t1 SET num = 1, val = 'one';
Query OK, 1 row affected (0.00 sec)

mysql57> SELECT * FROM t1;
+-----+------+
| num | val |
+-----+------+
| 1 | …
[さらに読む]
MySQL と寿司ビール問題

MySQL と Unicode Collation Algorithm (UCA) - かみぽわーる に関連するトピックで、 MySQL には寿司ビール問題というのがある。

寿司ビール問題どっかで詳しくお話を聞くべきだよなぁ。。。

— RKajiyama (@RKajiyama) March 18, 2015

これはどういう問題かというと、 MySQLUnicode では binary collation にしてコードポイントで比較しないと🍣と🍺に限らず絵文字が同値判定されるという問題です。

あれ? …

[さらに読む]
mysqlslap on ndb

MySQL SlapをNDB対して実行して、メモリー割り当て変化の簡単な確認

[root@misc bin]# /usr/local/mysql/bin/mysqlslap --no-defaults --create-schema=SLAP --engine=ndb --auto-generate-sql --auto-generate-sql-add-autoincrement --engine=ndb --number-int-cols=3 --number-char-cols=5 --concurrency=10 --auto-generate-sql-write-number=10000 --auto-generate-sql-execute-number=10000 --auto-generate-sql-load-type=mixed -h 192.168.56.114 -u admin -p
Enter password: 
Benchmark
        Running for engine ndb
        Average number of seconds to run all queries: 135.323 seconds
        Minimum number of seconds to run all queries: 135.323 seconds
        Maximum number of seconds to run all queries: 135.323 seconds
        Number of clients running queries: 10
        Average number of queries per client: 10000

[root@misc bin]# 

Node, …

[さらに読む]
MySQL 5.7でLOAD DATA INFILEに失敗する時に疑うこと(--secure-file-privの暗黙のデフォルトが少し変わった)

日々の覚書: MySQL 5.7.6は--secure-file-privを設定してないとWarningを吐くようになった のちょっと続き。

--secure-file-priv そのものについては↑の記事を読んでいただけると幸い。LOAD DATA INFILEやSELECT .. INTO OUTFILEの動きを制限する。


ドキュメントのsysvarのところに書いてある けれど、
* -DINSTALL_LAYOUT=STANDALONE, WIN でビルドされた場合は暗黙のデフォルトなし
* -DINSTALL_LAYOUT=DEB, RPM, SLES, SVR4 でビルドされた場合は"/var/lib/mysql-files" …

[さらに読む]
MySQL Cluster 7.4.4 基本動作確認

今回は、検証用に2台のノードにMySQL Clusterを導入してみました。
検証目的なので2台で設定してますが、本番ではデータノードは分けた方が良さそうです。

————————-
Node1: 192.168.56.114
Node2: 192.168.56.115
————————-

mysql> select * from ndbinfo.nodes;
+---------+--------+---------+-------------+-------------------+
| node_id | uptime | status  | start_phase | config_generation |
+---------+--------+---------+-------------+-------------------+
|       1 |   3994 | STARTED |           0 |                 1 |
|       2 |   3948 | STARTED |           0 |                 1 |
+---------+--------+---------+-------------+-------------------+
2 rows in set (0.05 sec)

mysql> 

mysql> select * from ndbinfo.arbitrator_validity_detail;
+---------+------------+------------------+---------------+-----------+
| node_id | arbitrator | arb_ticket …
[さらに読む]
MySQL と Unicode Collation Algorithm (UCA)

utf8_unicode_ci に対する日本の開発者の見解 - かみぽわーる で、日本語が分かる人には utf8_unicode_ci のヤバさを感じてもらえたと思うんですけど、この挙動はドキュメントによると UCA というアルゴリズムによるものらしい。

MySQL implements the xxx_unicode_ci collations according to the Unicode Collation Algorithm (UCA) described at …

[さらに読む]
MySQL Audit Logのローテーション

MySQL 監査ログのローテション
MySQL Enterprise Auditで取得した監査ログをMySQL Utilitiesを利用して、
定期的にローテーション出来るかどうか確認してみました。

ログをローテーションした結果

Audit Logのローテーションとしては、以下の2パターンがあります。

1) ログサイズによる自動ローテーション
sysvar_audit_log_rotate_on_size

If the audit_log_rotate_on_size value is greater than 0,
the audit log plugin closes and reopens its log file
if a write to the file causes its size to exceed this value.

2) …

[さらに読む]
3135 件中 1381 - 1390 件を表示
« 前の 10 件 | 次の 10 件 »