Skip to main content

Posts

SQL history lesson with Oracle V2

I recently stubmbled upon this website that hosts a publicly available Oracle RDBMS instance running Oracle v2.3.2, which according to this Wikipedia article is the first commercially available version of Oracle. This version is not written in C, but in PDP-11 assembly. The website also has the manuals available. At this time the company was called Relational Software Incorporated or RSI for short, which they later renamed to Oracle Systems Corporation and then to Oracle Corporation. Before this the company was called Software Development Laboratories (SDL). Let’s have a quick look at this and see how it compares with newer versions. This version uses “UFI”, the predecessor of SQL*Plus. Let’s first create a table SQL>CREATE TABLE T1 SQL>ID(NUMBER NONULL UNIQUE IMAGE), SQL>NAME(CHAR(20) NONULL) SQL>/ Table created. And let’s do the same with Oracle 26ai SQL> CREATE TABLE T1 ( 2 ID NUMBER PRIMARY KEY, 3 NAME CHAR(20) NOT NULL 4 ) 5 / Table created. ...
Recent posts

Wireshark now can decode MySQL X Protocol

The new protocol dissector for X Protocol in MySQL was just merged to the master branch in Wireshark. To get it build Wireshark from the master branch or wait for the next release. This protocol is using Google Protobuf, which makes it much easier to work with than the regular MySQL protocol. See also: https://dev.mysql.com/doc/dev/mysql-server/latest/page_mysqlx_protocol.html   If you like what Wireshark does, consider donating on https://wiresharkfoundation.org/donate/     

Why TLS for MySQL is difficult

The internet has changed to a place where most protocols like HTTP etc now use secure connections with TLS by default. While both HTTP and the MySQL Protocol use TLS for secure connections there are still many differences which make it difficult for MySQL to benefit from the same advancements as HTTP has seen in the last so many years. What is TLS? TLS stands for Transport Layer Security and is the successor of SSL (Socket Layer Security). SSL and TLS are often used interchangably, while this isn’t correct strictly speaking. What TLS provides is a standardized way to encrypt in transit traffic and authenticate the other end of the connection. TLS when used together with HTTP is known as HTTPS, for secure HTTP. How TLS works in HTTPS The client (webbrowser) connects to a server on port 443. Then negitiation is done to agree on what encryption method is to be used. The server presents the client with a certificate, which the client then verifies against the system trust store. For ...

Decoding MySQL's GTID_TAGGED_LOG_EVENT

This is a follow-up for MySQL GTID tags and binlog events , but you don’t need to read that first. One of the recent innovations in MySQL was the addition of Tagged GTID’s. These tagged GTID’s take the format of <uuid>:<tag>:<transaction_id> . And this change means that the GTID_LOG_EVENT ’s in the binary logs needed to be changed. The MySQL team at Oracle decided to not change the existing format, but introduce a new event: GTID_TAGGED_LOG_EVENT . Initially I assumed that decoding the new event would me mostly identical to the original event, but with just a single field added. But this isn’t the case as Oracle MySQL deciced to use a new serialization format (Yes, more innovation) and use it for this new event. The new serialization format is documented here . Oracle MySQL did their best to document the library and the format, but I guess the target audience is people using this library to encode and decode the format and not people working on implementations in...

The Potential of Query Attributes in MySQL

Introduction Query Attributes are a relatively new feature of the MySQL Protocol. This is availble since MySQL 8.0.23. Before Query Attributes were introduced there already was already another similar feature: Connetion Attributes, which provides per-connection metadata in the form of key/value pairs. This is what connection attributes look like: mysql > SELECT ATTR_NAME, ATTR_VALUE -> FROM performance_schema.session_connect_attrs -> WHERE PROCESSLIST_ID = 64 ; +------------------+---------------------+ | ATTR_NAME | ATTR_VALUE | +------------------+---------------------+ | _platform | amd64 | | _runtime_version | go1.23.4 | | _client_version | (devel) | | _client_role | binary_log_listener | | _client_name | go-mysql | | _os | linux | +------------------+---------------------+ 6 rows in set (0.00 sec) Connection attributes are set by connectors (wi...

MySQL GTID tags and binlog events

MySQL 8.4 and newer have extended the Global Transaction ID (GTID) functionality with a new “tag” option. Refresher on GTID A GTID is a unique ID that is assigned to a transaction. This is used if gtid_mode is set to ON . The benefit of this is that a transaction can be uniquely identified in a MySQL replication setup with multiple levels. Among others this makes it easier to refactor a replication tree as a MySQL replica knows which transactions it has seen and can use this to find the right position to start replicating from a new source. The format of GTIDs is documented here . Before GTID was used replication worked based on a file and offset (e.g. file= binlog.000001 ,offset= 4 ), which is unique to every server. A GTID without tag looks like this: 896e7882-18fe-11ef-ab88-22222d34d411:1 This is in the format of <server_uuid>:<txid> . The UUID of the server is in the server_uuid global variable and the txid is the transaction id, which is an increasing number....

Release and version management is hard

In this post I will talk about release management with MySQL as example. Release management has to do with what to put in a release, how often to do a release, how to long to support a release and how to number or name the releases. The early years Today software is almost exclusively delivered over the internet, but this didn’t use to be the case. Software used to be delivered in a box that you had to buy at a physical store. These were often shrink wrapped and forced you to agree with the EULA by opening the box. The box then contained floppies, CD’s, DVD’s or any other suitable medium. There were multiple reasons why physical media were used, even when the internet arrived. One of the main limitations was bandwidth, this is also why FreeBSD, Linux, etc were sold on physical media. And one of the other reasons was that online payment wasn’t as ubiquitous as it is today. Then there were also ways of copy protection that relied on physical media and/or dongles. For operating systems...