Showing entries 1856 to 1865 of 44804
« 10 Newer Entries | 10 Older Entries »
pt-online-schema-change resulted in missing MySQL triggers ?

Recently, while doing a test process to examine resource usage and the time required to alter the table using pt-osc, it leads to a loss of triggers even though the –preserve-triggers option is specified. I made the decision to recreate the identical circumstance so that everyone could see it.

Test environment : 

OS: Amazon Linux 2

MySQL version: 5.7.40

pt-online-schema-change version: 3.1.0

Before digging deeper, we must first obtain the whole picture. Here is an illustration of the table’s structure.

Table structure:

[Read more]
Updating SQL_MODE

This is an update for MySQL 8 Stored PSM to add the ONLY_FULL_GROUP_BY mode to the global SQL_MODE variable when it’s not set during a session. Here’s the code:

/* Drop procedure conditionally on whether it exists already. */
DROP PROCEDURE IF EXISTS set_full_group_by;

/* Reset delimter to allow semicolons to terminate statements. */
DELIMITER $$

/* Create a procedure to verify and set connection parameter. */
CREATE PROCEDURE set_full_group_by()
  LANGUAGE SQL
  NOT DETERMINISTIC
  SQL SECURITY DEFINER
  COMMENT 'Set connection parameter when not set.'
BEGIN

  /* Check whether full group by is set in the connection and
     if unset, set it in the scope of the connection. */
  IF EXISTS
    (SELECT TRUE
     WHERE NOT REGEXP_LIKE(@@SESSION.SQL_MODE,'ONLY_FULL_GROUP_BY'))
  THEN
    SET @@GLOBAL.SQL_MODE := CONCAT(@@SESSION.sql_mode,',ONLY_FULL_GROUP_BY');
  END IF;
END;
$$

/* Reset the default delimiter. */
DELIMITER ;

You can call the …

[Read more]
Knex (with MySQL) had a very scary SQL injection

Knex recently released a new version this week (2.4.0). Before this version, Knex had a pretty scary SQL injection. Knex currently has 1.3 million weekly downloads and is quite popular.

The security bug is probably one of the worst SQL injections I’ve seen in recent memory, especially considering the scope and popularity.

If you want to get straight to the details:

My understanding of this bug

If I understand the vulnerability correctly, I …

[Read more]
MySQL HeatWave Database Service inbound replication channel troubleshooting guide

Follow this guide to troubleshoot Inboud Replication Channel to OCI MySQL HeatWave Database Service if replication is not running

Functional Indexes in MySQL

First introduced to MySQL in version 8.013, functional indexes give us the ability to create indexes based on expressions rather than the values of data in a database column. In this post we discuss how to create functional indexes as well as some limitations and implications with their use.

MySQL HeatWave Database Service inbound replication channel troubleshooting guide

Using a MySQL HeatWave Database Service instance in OCI as an asynchronous replica is very useful. It allows testing the service with always updated data from on-premise production or from another cloud environement. It can be used in the process  of migrating with minimal downtime to OCI and finally, it can also be used between […]

Functional Indexes in MySQL

Database indexes are used to help query performance. Database indexes typically contain information about data in a specific column of the database table. With the introduction of functional indexes in MySQL 8.0.13, we can now create indexes based on the result of an expression or function. The Setup Before talking about functional indexes, let’s get some data set up. […]

MySQL Connection Control

As a MySQL database administrator, have you ever faced a brute force attack on your database server or been the target of a DDOS-like connection flow on port 3306? If so, you will quickly understand why this plugin distributed with MySQL can be very useful in such situations. Indeed, the connection-control plugin allows the administrator […]

MySQL Connection Control

What is MySQL Connection Control and how to use it.

Indexing JSON Data in MySQL

Developers have been storing JSON data in MySQL databases since before the JSON data type existed. With the introduction of functional indexes, developers can now create indexes based on values in data stored in a column with the JSON data type.

Showing entries 1856 to 1865 of 44804
« 10 Newer Entries | 10 Older Entries »