Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  fk_drop_alter.result   Sprache: Lisp

 

#
#  MDEV-22230 : Unexpected ER_ERROR_ON_RENAME upon DROP
# non-existing FOREIGN KEY
#
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
ALTER TABLE t1 DROP FOREIGN KEY x, ALGORITHM=COPY;
ERROR 42000: Can't DROP FOREIGN KEY `x`; check that it exists
ALTER TABLE t1 DROP FOREIGN KEY x, ALGORITHM=INPLACE;
ERROR 42000: Can't DROP FOREIGN KEY `x`; check that it exists
DROP TABLE t1;
CREATE TABLE t1 (a INT, KEY(a)) ENGINE=InnoDB;
CREATE TABLE t2 (a INT, FOREIGN KEY fk_id (a) REFERENCES t1(a))ENGINE=InnoDB;
CREATE TABLE t3 (a INT, FOREIGN KEY fk_1 (a) REFERENCES t1(a))ENGINE=InnoDB;
ALTER TABLE t3 DROP FOREIGN KEY IF EXISTS fk_id;
Warnings:
Note 1091 Can't DROP FOREIGN KEY `fk_id`; check that it exists
DROP TABLE t3, t2;
ALTER TABLE t1 MODIFY COLUMN a VARCHAR(2), DROP FOREIGN KEY IF EXISTS x;
Warnings:
Note 1091 Can't DROP FOREIGN KEY `x`; check that it exists
DROP TABLE t1;
CREATE DATABASE best;
CREATE TABLE best.t1(f1 INT, KEY(f1))ENGINE=InnoDB;
CREATE TABLE best.t2(f1 INT, FOREIGN KEY foo(f1) REFERENCES t1(f1))ENGINE=InnoDB;
CREATE TABLE t1(f1 INT, KEY(f1))ENGINE=InnoDB;
CREATE TABLE t2(f1 INT, FOREIGN KEY foo(f1) REFERENCES t1(f1))ENGINE=InnoDB;
ALTER TABLE t2 DROP FOREIGN KEY foo;
ALTER TABLE t2 DROP FOREIGN KEY foo;
ERROR 42000: Can't DROP FOREIGN KEY `foo`; check that it exists
ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS foo;
Warnings:
Note 1091 Can't DROP FOREIGN KEY `foo`; check that it exists
SHOW CREATE TABLE best.t2;
Table Create Table
t2 CREATE TABLE `t2` (
  `f1` int(11) DEFAULT NULL,
  KEY `foo` (`f1`),
  CONSTRAINT `foo` FOREIGN KEY (`f1`) REFERENCES `t1` (`f1`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
ID FOR_NAME REF_NAME N_COLS TYPE
foo best/t2 best/t1 1 0
DROP TABLE best.t2, best.t1, t2, t1;
DROP DATABASE best;

Messung V0.5 in Prozent
C=35 H=100 G=74

¤ Dauer der Verarbeitung: 0.8 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126438
#Domains=1897691