Torvalds sarcastically quipped about the name git (which means "unpleasant person" in British English slang): "I'm an egotistical bastard, and I name all my projects after myself. First 'Linux', now 'git'."
We wanted a word meaning "idiot", starting with D for Data, short enough to type on the command line, and not taken in the standard command line lexicon. So,
Dolt is MySQL-compatible. Dolt is a replacement for MySQL or Postgres. Dolt does not contain any MySQL code but you connect to it with a MySQL client. It is usually not difficult to convert Postgres SQL to MySQL SQL.
This is a SQL variable that you can turn on for your SQL session like so:
SET @@autocommit = 1
It's on by default in the MySQL shell, as well as in most clients. But some clients (notably the Python MySQL connector) turn it off by default.
You must commit your changes for them to persist after your session ends, either by setting
@@autocommitto on, or by issuing
COMMITis a standard SQL statement that commits a transaction. In dolt, it just flushes any pending changes in the current SQL session to disk, updating the working set. HEAD stays the same, but your working set changes. This means your edits will persist after this session ends.
DOLT_COMMIT()commits the current SQL transaction, then creates a new dolt commit on the current branch. It's the same as if you run
dolt commitfrom the command line.
We are glad you asked! This is a common use case, and giving each user their own branch is something we've spent a lot of time getting right. For more details on how to use this pattern effectively, see using branches.
Yes, it should exactly work the same as MySQL, but with fewer locks for competing writes.
Probably! Have you tried it? If you try it and it doesn't work, let us know with an issue or in our Discord and we'll see what we can do. A lot of times we can fix small compatibility issues really quick, like the same week. And even if we can't, we want to know about it! Our goal is to be a 100% drop-in replacement for MySQL.
Previously, Dolt automatically synced doc files from the file system to the
dolt_docstable. This process is now manual and performed with the
dolt docsCLI command.
dolt docs upload [doc name] [file name]reads a file into the
dolt_docstable with the given name.
dolt docs print [doc name]prints a doc with the given name to stdout.
Dolt has a command called read-tables that reads the tables at a remote, commit pair and creates a new Dolt database without any history. This new database is often much smaller than the database it was created from. Note, this new database cannot be merged with the database it was created from. It is a new thing.