Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.3.23
-
Debian 8.0 (Jessie)
Description
I tried creating the following tables on 2 servers:
// Master
|
CREATE DATABASE IF NOT EXISTS test; |
|
CREATE TABLE IF NOT EXISTS test.test_data ( |
id INT, |
content VARCHAR(255), |
PRIMARY KEY (id) |
) ENGINE=INNODB;
|
|
INSERT INTO test.test_data |
VALUES
|
(1, "Test 01"), |
(2, "Test 02"); |
// Slave
|
CREATE DATABASE IF NOT EXISTS test; |
|
CREATE TABLE IF NOT EXISTS test.test_data ( |
id INT, |
content VARCHAR(255) |
) ENGINE=CONNECT TABLE_TYPE=MYSQL OPTION_LIST='connect=server_connect' |
SRCDEF='SELECT id, content FROM test.test_data WHERE %s'; |
|
CREATE TABLE IF NOT EXISTS test.test_trigger ( |
id INT, |
content VARCHAR(255), |
PRIMARY KEY (id) |
) ENGINE=INNODB;
|
|
DELIMITER //
|
|
DROP TRIGGER IF EXISTS test.after_test_trigger; |
//
|
CREATE TRIGGER test.after_test_trigger |
AFTER INSERT ON test.test_trigger |
FOR EACH ROW |
BEGIN
|
SET @test_content = ( |
SELECT td.content |
FROM test.test_data td |
WHERE
|
td.id = NEW.id
|
);
|
END // |
INSERT INTO test.test_trigger |
VALUES
|
(1, "Test 01"), |
(2, "Test 02"); |
I've attached general log below. You'll find only the last statement that quit this connection "208", the rest won't. Therefore, when I update 200 rows, it exceeds 200 connections and show error "Too many connections".
Thanks.
Attachments
Issue Links
- duplicates
-
MDEV-23673 CONNECT Engine - (1040) Too many connections when running in trigger
- Closed