Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/main/   (MariaDB Server Version 8.1-8.4©)  Datei vom 1.9.2026 mit Größe 4 kB image not shown  

Quelle  partition_range_interval_debug.result   Sprache: Lisp

 

# Concurrency test: if two threads T1 and T2 both try to insert
# into the same table, where T1 acquires the lock to
# auto-create the new partitions first, T2 has to wait until
# the creation to complete before it can determine how many new
# partitions to auto-create
## T2 cannot acquire lock while T1 has started partition auto-creation
set lock_wait_timeout=1;
set timestamp= unix_timestamp('2026-05-02 00:00:00');
connect  con1,localhost,root,,;
set lock_wait_timeout=1;
set timestamp= unix_timestamp('2026-05-02 00:00:00');
connection default;
create table t1 (c date) engine=innodb
PARTITION BY RANGE COLUMNS (c)
INTERVAL 1 Day
(
PARTITION p0 VALUES LESS THAN ('2026-04-20')
);
SET DEBUG_SYNC = 'range_interval_create_partitions_lock_acquired SIGNAL con1_will_wait WAIT_FOR default_can_go';
insert into t1 values ('2026-04-25');
connection con1;
SET DEBUG_SYNC = 'now WAIT_FOR con1_will_wait';
SET DEBUG_SYNC = 'before_open_table_wait_refresh SIGNAL default_can_go';
insert into t1 values ('2026-04-26');
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
connection default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `c` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY RANGE  COLUMNS(`c`) INTERVAL 1 DAY
(PARTITION `p0` VALUES LESS THAN ('2026-04-20') ENGINE = InnoDB,
 PARTITION `p1` VALUES LESS THAN ('2026-04-21') ENGINE = InnoDB,
 PARTITION `p2` VALUES LESS THAN ('2026-04-22') ENGINE = InnoDB,
 PARTITION `p3` VALUES LESS THAN ('2026-04-23') ENGINE = InnoDB,
 PARTITION `p4` VALUES LESS THAN ('2026-04-24') ENGINE = InnoDB,
 PARTITION `p5` VALUES LESS THAN ('2026-04-25') ENGINE = InnoDB,
 PARTITION `p6` VALUES LESS THAN ('2026-04-26') ENGINE = InnoDB,
 PARTITION `p7` VALUES LESS THAN ('2026-04-27') ENGINE = InnoDB,
 PARTITION `p8` VALUES LESS THAN ('2026-04-28') ENGINE = InnoDB,
 PARTITION `p9` VALUES LESS THAN ('2026-04-29') ENGINE = InnoDB,
 PARTITION `p10` VALUES LESS THAN ('2026-04-30') ENGINE = InnoDB,
 PARTITION `p11` VALUES LESS THAN ('2026-05-01') ENGINE = InnoDB,
 PARTITION `p12` VALUES LESS THAN ('2026-05-02') ENGINE = InnoDB,
 PARTITION `p13` VALUES LESS THAN ('2026-05-03') ENGINE = InnoDB)
select * from t1;
c
2026-04-25
drop table t1;
## T2 auto-creates the correct number of partitions after
## waiting for T1 to finish its auto-creation.
## A slight exaggeration: T1 not finished after two days.
connection default;
set timestamp= unix_timestamp('2026-05-02 00:00:00');
connection con1;
set timestamp= unix_timestamp('2026-05-04 00:00:00');
connection default;
create table t1 (c date) engine=innodb
PARTITION BY RANGE COLUMNS (c)
INTERVAL 1 Day
(
PARTITION p0 VALUES LESS THAN ('2026-04-20')
);
SET DEBUG_SYNC = 'range_interval_create_partitions_lock_acquired SIGNAL con1_will_wait WAIT_FOR default_can_go';
insert into t1 values ('2026-04-25');
connection con1;
SET DEBUG_SYNC = 'now WAIT_FOR con1_will_wait';
SET DEBUG_SYNC = 'before_open_table_get_mdl_lock SIGNAL default_can_go';
insert into t1 values ('2026-04-26');
connection default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `c` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY RANGE  COLUMNS(`c`) INTERVAL 1 DAY
(PARTITION `p0` VALUES LESS THAN ('2026-04-20') ENGINE = InnoDB,
 PARTITION `p1` VALUES LESS THAN ('2026-04-21') ENGINE = InnoDB,
 PARTITION `p2` VALUES LESS THAN ('2026-04-22') ENGINE = InnoDB,
 PARTITION `p3` VALUES LESS THAN ('2026-04-23') ENGINE = InnoDB,
 PARTITION `p4` VALUES LESS THAN ('2026-04-24') ENGINE = InnoDB,
 PARTITION `p5` VALUES LESS THAN ('2026-04-25') ENGINE = InnoDB,
 PARTITION `p6` VALUES LESS THAN ('2026-04-26') ENGINE = InnoDB,
 PARTITION `p7` VALUES LESS THAN ('2026-04-27') ENGINE = InnoDB,
 PARTITION `p8` VALUES LESS THAN ('2026-04-28') ENGINE = InnoDB,
 PARTITION `p9` VALUES LESS THAN ('2026-04-29') ENGINE = InnoDB,
 PARTITION `p10` VALUES LESS THAN ('2026-04-30') ENGINE = InnoDB,
 PARTITION `p11` VALUES LESS THAN ('2026-05-01') ENGINE = InnoDB,
 PARTITION `p12` VALUES LESS THAN ('2026-05-02') ENGINE = InnoDB,
 PARTITION `p13` VALUES LESS THAN ('2026-05-03') ENGINE = InnoDB,
 PARTITION `p14` VALUES LESS THAN ('2026-05-04') ENGINE = InnoDB,
 PARTITION `p15` VALUES LESS THAN ('2026-05-05') ENGINE = InnoDB)
select * from t1;
c
2026-04-25
2026-04-26
drop table t1;

Messung V0.5 in Prozent
C=66 H=100 G=84

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-10-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.