So you need to build a new set of databases, perhaps in a new location or geographical zone and the business wants it done yesterday cause the newly launched product hit the front page of hacker news and your website … Continue reading →
Question: Hey, I got a UNIQUE INDEX, but I can store multiple rows with the same value, NULL. That is surprising. Is that a bug?
This is a rewrite of the same in German from 9 years ago.
root@localhost [kris]> create table t ( a integer, b integer, unique (a,b));
Query OK, 0 rows affected (0.09 sec)
root@localhost [kris]> insert into t values (1, 2);
Query OK, 1 row affected (0.01 sec)
root@localhost [kris]> insert into t values (1, 2);
ERROR 1062 (23000): Duplicate entry '1-2' for key 't.a'
This does not work, as expected. But this does:
root@localhost [kris]> truncate table t;
Query OK, 0 rows affected (0.16 sec)
root@localhost [kris]> insert into t values ( 1, NULL);
Query OK, 1 row affected (0.02 sec)
root@localhost [kris]> insert into t values ( 1, NULL);
Query OK, 1 row affected (0.03 …
[Read more]
How does MySQL compare INTs with CHARs? I was asked this very question over the weekend and wanted to share that information plus some of the changes in MySQL 8.0.21 in this area. And yes those changes are pretty big.
Casting
Computers are good at making comparisons of two values but only if everything else the same. Comparing an integer with another integer is simple. Same data with same data type comparisons are a good thing. But what about when you need to compare a numeric 7 with a "7" where the number is in a string? In such cases one or both numbers need to be changed into the same basic data type. Imagine your favorite Harry Potter character waving their magic wand and shouting 'accio data' to change two different magical pieces of data into one common data type. No, Hogwarts was the the reason this conversion is called casting but this 'magic' needs …
[Read more]Owing to the success and feedback we received from our last training course, we will be running another 2 sessions, both for European, as we well as Pacific Time zones
Delivered by our Professional ProxySQL Trainers who have built and actively maintain ProxySQL.
ProxySQL was built in order to help build, support and improve MySQL infrastructure.
Our public 2x Day Training course will help you learn about how to use ProxySQL’s features effectively and to efficiently deal with real life events and emergency situations in your infrastructure.
The rich course content provides insights to help you build a strong understanding of the tool’s design goals, and most importantly… how to properly implement ProxySQL in order to maximize the resource utilization of your database cluster while avoiding common pitfalls and anti-patterns!
Immerse yourself in the world of ProxySQL with our two-day …
[Read more]Have you ever had to provision a large number of instances from a single backup? The most common use case is having to move to new hardware, but there are other scenarios as well. This kind of procedure can involve multiple backup/restore operations which can easily become a pain to administer. Let’s look at a potential way to make it easier using Percona Xtrabackup. The Percona XtraBackup tool provides a method of performing fast and reliable backups of your MySQL data while the system is running.
Leveraging Named Pipes
As per the Linux manual page, a FIFO special file (a named pipe) is similar to a pipe except that it is accessed as part of the filesystem. It can be opened by multiple processes for reading or writing.
For this …
[Read more]
Using the MySQL ALTER TABLE
command, you can easily
change an existing columns’ name and datatype. With just a few
clicks, you can do the same in the phpMyAdmin visual web
interface. For many developers, this interface is the one they
lean on most while programming so it can’t hurt to know how to do
it yourself should you find yourself programming in this
environment…
Self-Promotion
If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!
Suppose we have a table with these 3 columns:
- id
- title
- grade
Our goal is to rename the title column to paper_title and to also change the datatype …
[Read more]So this has turned into a small series, explaining how to work with MYSQL from a developers perspective. This post is intended as a directory for the individual articles. It will be amended and re-dated as necessary.
The code for the series is also available in isotopp/mysql-dev-examples on GitHub.
The Tag #mysqldev will reference all articles from this series.
-
MySQL Transactions - the physical side. Looking at how MySQL InnoDB handles transactions on the physical media, enabling rollback and commit. Introduces a number of important concepts: The Undo Log, the Redo Log, the Doublewrite Buffer, and the corrosponding in memory …
We are excited to let you know about two upcoming changes to Percona XtraBackup which will align Percona XtraBackup Versions with Percona Server for MySQL. These changes are to bring Percona XtraBackup release naming line with Percona Server and MySQL and ensure Percona XtraBackup executes complete backups.
The first is a change to the naming structure of releases. This change is something we believe will help when working with Percona products and is designed to position Percona XtraBackup to be in sync with the current release naming strategy of Percona Server for MySQL and Percona XtraDB Cluster.
The current naming structure of …
[Read more]This is the updated and english version of some older posts of mine in German. It is likely still incomplete, and will need information added to match current MySQL, but hopefully it is already useful.
Old source articles in German: 1, 2 and 3.
Some vocabulary
Symbol, Font, Encoding and Collation - what do they even mean?
A character set is a collection of symbols that belong together. That is a completely abstract thing, and also almost useless. The only thing you can do with a character set is decide if a specific symbol is legal within a context or not. And, if it is legal, what position the …
[Read more]
Before i talk about “Selective Restore” , it is more important to know below details:-
- What is MySQL Enterprise Backup ?
- Features of MySQL Enterprise Backup.
- Benchmarking “mysqldump” Vs “mysql enterprise backup”
- What is TLR (table level Recovery)
- Limitations of TLR
- Conclusion
What is MySQL Enterprise Backup ?
It is a multi-platform, high-performance tool, offering rich features like “hot” (online) backup, incremental and differential backup, selective backup and restore, support for direct cloud storage backup, backup encryption and compression, and many other valuable features.
This MEB is bundled with MySQL Commercial Editions.
More info:- …
[Read more]