This is a quick reminder that this week there are 2 MySQL User Group Meetings (Amsterdam and Madrid) where we will be talking about Scaling MySQL. Guest speaker will be Morgan Tocker from PingCap who will talk about TiDB. More information: MySQL User Group NL meetup taking place on Monday (presenting: Morgan, Daniël and Simon) … Continue reading Reminder: MySQL User Group NL and Madrid MySQL User Group Meetups presenting Scaling MySQL this week (Monday/Thursday)
[Read more]The other day, I was reading a blog by Magnus Hagander about tracking foreign keys throughout a schema in PostgreSQL. I thought it was a good idea, so I decided to look at how you can track foreign key in MySQL.
The way I decided to do it was to start out with a table, then
find all tables referencing the table by a foreign key. From this
basic (and simple as it will be shown) query, it is possible to
create a chain of relations. The key table for the queries is
…
Scenarios:-
I met with requirements where database has to generate business
error if users are try to fetch more than 1000 records
from table.
Solutions:-
In MySQL to handle business error , we have to implement
SIGNAL/RESIGNAL in code business logic.
This enable us to any time we can break our execution of code
flow & generate Business Error as per our
Requirements.
There is no privileges are required to execute SIGNAL/RESIGNAL
statement.
To handle normal error block, we have DECLARE CONTINUE/EXIT
HANDLER ... Block , what it does is when ever encountered error
during code execution HANDLER Block triggered and manage code
execution inside of it. it is more flexiable because developers
gets flexibility to write multi-statements inside HANDLER
blocks.
More
Info: https://dev.mysql.com/doc/refman/8.0/en/resignal.html
…
The old adage that time is money does not give any hints about buying more time. A MySQL Enterprise subscription does allow you to purchase time. Your technical staff has to do more with less time than ever before and operational delays add up extremely quickly. Having the right tools when things go critical means staff can do what they need to do, when they need to do it.
So how does MySQL Enterprise Edition buy you more time?
When things inevitably go wrong, searching for free answers to problems on web sites with many dubious or flat out wrong solutions is a waste of precious time. Informational websites like are fine sources of general information for researching technical issues but not when mission critical services are degraded or down. An online recommendation to do what very large Enterprise Company does may not make sense for your company if you are not …
[Read more]
JSON has proven to be a very import data format with immense
popularity. A good part of my time for the last two or so years
has been dedicated to this area and I even wrote a book on the subject. This is a
comparison of the implementations of handling JSON data in MySQL
and MariaDB. I had requests from the community and customers for
this evaluation.
JSON Data Types Are Not All Equal
MySQL added a JSON data type in version 5.7 and it has proven to
be very popular. MariaDB has JSON
support version 10.0.16 but is actually an alias to a
longtext data type so that statement based replication
from MySQL to MariaDB is possible.
MySQL stores JSON documents are …
MySQL Replication Data Recovery using 'mysqlbinlog' - Part
II
The previous post (PART-I)
http://mysqlhk.blogspot.com/2018/10/mysql-replication-recovery-from-binlog.html
It describes the Replication Recovery from binlog by using those
binlog files to be treated as Relay Log. The Relay Log
mechanism when the server is startup, the recovery is the
SQL_THREAD applier to apply data to the
database. Check on the PART-I post for
details.
Part II is about using the MySQL utility "mysqlbinlog" to dump
the content from binlog files and apply the SQL to the
Database.
Documentation
https://dev.mysql.com/doc/refman/8.0/en/mysqlbinlog.html
https://dev.mysql.com/doc/refman/8.0/en/point-in-time-recovery.html
The following sections describe the tutorial for Replication Data
Recovery using 'mysqlbinlog'.
The tutorial …
MySQL 8.0 Code Contributions (Shutterstock)
An Oracle engineer thanked two Percona engineers by name, along with engineers from Facebook and elsewhere, for their recent MySQL 8.0 source code contributions. Oracle incorporated their work into its latest MySQL production release (8.0.13).
Percona’s Zsolt Parragi authored a patch for a rare replication bug that left locked mutexes in production builds following debug crashes (bug # …
[Read more]Somebody on Freenode wanted this:
Source Result +----+------+ +----+------+ | id | x | | id | c | +----+------+ +----+------+ | 1 | 1 | | 1 | 2 | | 2 | 1 | | 2 | 2 | | 3 | NULL | | 3 | NULL | | 4 | NULL | -> | 4 | NULL | | 5 | 1 | | 5 | 1 | | 6 | NULL | | 6 | NULL | | 7 | 1 | | 7 | 3 | | 9 | 1 | | 9 | 3 | | 10 | 1 | | 10 | 3 | +----+------+ +----+------+
The result uses the NULL values in x as boundaries of windows, and counts the number of rows within each window. I don’t know why anyone wants such a thing; it is not ours to reason why…
Anyway, the point is that you can use arbitrary expressions, even subqueries, to define your window partitions.
SELECT
id,
-- Count of rows in windows bound by NULL values in x
IF(
x IS NULL,
NULL,
COUNT(*) OVER (PARTITION BY (
-- …[Read more]
If you’re here, that probably means you’re about to acquire some sensitive data to take care of. Or that you’ve already acquired it and are protecting it, and you want to see how MySQL Enterprise Data Masking and De-Identification features can help you do it in an easier, better and more efficient manner.…
As promised, here are slides about MySQL 8.0 Performance
from my talks at Oracle Open World 2018 and Percona LIVE Europe
2018 -- all is combined into a single PDF file to give you an
overall summary about what we already completed, where we're
going in the next updates within our "continuous release", and
what kind of performance issues we're digging right now..
;-))
Also, I'd like to say that both Conferences were simply awesome,
and it's great to see a constantly growing level of skills of all
MySQL Users attending these Conferences ! -- hope you'll have
even more fun with MySQL 8.0 now ;-))