github dolthub/dolt v0.20.2
0.20.2

latest releases: v1.47.0, v1.46.0, v1.45.6...
4 years ago

We are excited to announce the release of Dolt 0.20.2, including a minor version bump as we introduce a new feature SQL triggers.

SQL Triggers

SQL triggers are SQL snippets that can be executed every time a row is inserted. Here is a simple example taken from the blog post announcing the feature:

$ dolt sql
> create table a (x int primary key);
> create table b (y int primary key);
> create trigger adds_one before insert on a for each row set new.x = new.x + 1;
> insert into a values (1), (3);
Query OK, 2 rows affected
trigger_blog> select * from a;
+---+
| x |
+---+
| 2 |
| 4 |
+---+

Any legal SQL statement can be executed as a trigger, here we just defined a simple increment.

Merged PRs

  • 908: Added comments for clarity
  • 907: Release
  • 906: Fixed conflict resolution and additional trigger tests
  • 905: Updated to latest go-mysql-server
  • 904: Added trigger functionality to Dolt
  • 900: Reference new org name
  • 897: Fixed CREATE LIKE multi-db
    Fixes #654
  • 896: Moved everything over to SHOW CREATE TABLE and fixed diff panic
  • 894: Fixed UNIQUE NULL handling to match MySQL
  • 892: Andy/gc table files
  • 890: Working Ruby ruby/mysql test
    Not to be confused with mysql/ruby which uses the MySQL C API.
  • 889: Release
  • 202: Zachmu/triggers 5
    Added additional validation for trigger creation and execution:
    • Use of NEW / OLD row references
    • Circular trigger chains
  • 200: Zachmu/triggers 4
    Support for DELETE and UPDATE triggers
  • 199: Reference new org name
  • 198: Added proper support for SET NAMES, and also turned off strict checking for setting unknown system variables.
  • 197: Zachmu/user vars
    User vars now working. Can stomp on a system var of the same name, as before my last batch of changes.
  • 196: Allow CREATE TABLE LIKE to reference different databases
  • 195: Zachmu/triggers 3
    This gets SET new.x = foo expressions working for triggers. This required totally rewriting how we were handling setting system variable as well, since these two kinds of statements are equivalent in the parser.
    Also deletes the convert_dates analyzer rule, which impacts 0 engine tests.
  • 194: No longer return span iters from most nodes by default.
  • 193: Implemented CREATE TABLE LIKE and updated information_schema
    Tests will come in a separate PR

Don't miss a new dolt release

NewReleases is sending notifications on new releases.