Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  table_options.result   Sprache: Lisp

 

SET @OLD_SQL_MODE=@@SQL_MODE;
SET SQL_MODE='IGNORE_BAD_TABLE_OPTIONS';
create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1='1v1';
Warnings:
Warning 1911 Unknown option 'fkey'
Warning 1911 Unknown option 'dff'
Warning 1911 Unknown option 'tkey1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey`='vvv',
  KEY `akey` (`a`) `dff`='vvv'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey1`='1v1'
drop table t1;
#reassigning options in the same line
create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1=1v1 TKEY1=DEFAULT tkey1=1v2 tkey2=2v1;
Warnings:
Warning 1911 Unknown option 'fkey'
Warning 1911 Unknown option 'dff'
Warning 1911 Unknown option 'tkey1'
Warning 1911 Unknown option 'tkey2'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey`='vvv',
  KEY `akey` (`a`) `dff`='vvv'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey1`='1v2' `tkey2`='2v1'
#add option
alter table t1 tkey4=4v1;
Warnings:
Warning 1911 Unknown option 'tkey4'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey`='vvv',
  KEY `akey` (`a`) `dff`='vvv'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey1`='1v2' `tkey2`='2v1' `tkey4`='4v1'
#remove options 
alter table t1 tkey3=DEFAULT tkey4=DEFAULT;
Warnings:
Warning 1911 Unknown option 'tkey3'
Warning 1911 Unknown option 'tkey4'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey`='vvv',
  KEY `akey` (`a`) `dff`='vvv'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey1`='1v2' `tkey2`='2v1'
drop table t1;
create table t1 (a int fkey1=v1, key akey (a) kkey1=v1) tkey1=1v1 tkey1=1v2 TKEY1=DEFAULT tkey2=2v1 tkey3=3v1;
Warnings:
Warning 1911 Unknown option 'fkey1'
Warning 1911 Unknown option 'kkey1'
Warning 1911 Unknown option 'TKEY1'
Warning 1911 Unknown option 'tkey2'
Warning 1911 Unknown option 'tkey3'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey1`='v1',
  KEY `akey` (`a`) `kkey1`='v1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey2`='2v1' `tkey3`='3v1'
#change field with option with the same value
alter table t1 change a a int `FKEY1`='v1';
Warnings:
Warning 1911 Unknown option 'FKEY1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `FKEY1`='v1',
  KEY `akey` (`a`) `kkey1`='v1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey2`='2v1' `tkey3`='3v1'
#change field with option with a different value
alter table t1 change a a int fkey1=v2;
Warnings:
Warning 1911 Unknown option 'fkey1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey1`='v2',
  KEY `akey` (`a`) `kkey1`='v1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey2`='2v1' `tkey3`='3v1'
#new column no options
alter table t1 add column b int;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey1`='v2',
  `b` int(11) DEFAULT NULL,
  KEY `akey` (`a`) `kkey1`='v1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey2`='2v1' `tkey3`='3v1'
#new key with options
alter table t1 add key bkey (b) kkey2=v1;
Warnings:
Warning 1911 Unknown option 'kkey2'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey1`='v2',
  `b` int(11) DEFAULT NULL,
  KEY `akey` (`a`) `kkey1`='v1',
  KEY `bkey` (`b`) `kkey2`='v1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey2`='2v1' `tkey3`='3v1'
#new column with options
alter table t1 add column c int fkey1=v1 fkey2=v2;
Warnings:
Warning 1911 Unknown option 'fkey1'
Warning 1911 Unknown option 'fkey2'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey1`='v2',
  `b` int(11) DEFAULT NULL,
  `c` int(11) DEFAULT NULL `fkey1`='v1' `fkey2`='v2',
  KEY `akey` (`a`) `kkey1`='v1',
  KEY `bkey` (`b`) `kkey2`='v1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey2`='2v1' `tkey3`='3v1'
#new key no options
alter table t1 add key ckey (c);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey1`='v2',
  `b` int(11) DEFAULT NULL,
  `c` int(11) DEFAULT NULL `fkey1`='v1' `fkey2`='v2',
  KEY `akey` (`a`) `kkey1`='v1',
  KEY `bkey` (`b`) `kkey2`='v1',
  KEY `ckey` (`c`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey2`='2v1' `tkey3`='3v1'
#drop column
alter table t1 drop b;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey1`='v2',
  `c` int(11) DEFAULT NULL `fkey1`='v1' `fkey2`='v2',
  KEY `akey` (`a`) `kkey1`='v1',
  KEY `ckey` (`c`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey2`='2v1' `tkey3`='3v1'
#add column with options after delete
alter table t1 add column b int fkey2=v1;
Warnings:
Warning 1911 Unknown option 'fkey2'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey1`='v2',
  `c` int(11) DEFAULT NULL `fkey1`='v1' `fkey2`='v2',
  `b` int(11) DEFAULT NULL `fkey2`='v1',
  KEY `akey` (`a`) `kkey1`='v1',
  KEY `ckey` (`c`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey2`='2v1' `tkey3`='3v1'
#add key 
alter table t1 add key bkey (b) kkey2=v2;
Warnings:
Warning 1911 Unknown option 'kkey2'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL `fkey1`='v2',
  `c` int(11) DEFAULT NULL `fkey1`='v1' `fkey2`='v2',
  `b` int(11) DEFAULT NULL `fkey2`='v1',
  KEY `akey` (`a`) `kkey1`='v1',
  KEY `ckey` (`c`),
  KEY `bkey` (`b`) `kkey2`='v2'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey2`='2v1' `tkey3`='3v1'
drop table t1;
create table t1 (a int) tkey1=100;
Warnings:
Warning 1911 Unknown option 'tkey1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `tkey1`='100'
drop table t1;
#error on unknown option
SET SQL_MODE='';
create table t1 (a int fkey=vvv, key akey (a) dff=vvv) tkey1=1v1;
ERROR HY000: Unknown option 'fkey'
SET @@SQL_MODE=@OLD_SQL_MODE;
#
# End of 5.5 tests
#
#
# MDEV-31822 ALTER TABLE ENGINE=x started failing instead of producing warning on unsupported TRANSACTIONAL=1
#
create table t0 (a int) transactional=0 engine=aria;
create table t1 (a int) transactional=1 engine=aria;
create table t2 (a int) transactional=default engine=aria;
show create table t0;
Table Create Table
t0 CREATE TABLE `t0` (
  `a` int(11) DEFAULT NULL
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1 TRANSACTIONAL=0
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1 TRANSACTIONAL=1
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
  `a` int(11) DEFAULT NULL
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
alter table t0 engine=myisam;
alter table t1 engine=myisam;
alter table t2 engine=myisam;
show create table t0;
Table Create Table
t0 CREATE TABLE `t0` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1 /* TRANSACTIONAL=0 */
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1 /* TRANSACTIONAL=1 */
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
alter table t0 engine=myisam transactional=0;
ERROR HY000: Unknown option 'transactional'
alter table t1 engine=myisam transactional=1;
ERROR HY000: Unknown option 'transactional'
alter table t2 engine=myisam transactional=default;
ERROR HY000: Unknown option 'transactional'
set sql_mode=IGNORE_BAD_TABLE_OPTIONS;
alter table t0 engine=myisam transactional=0;
Warnings:
Warning 1911 Unknown option 'transactional'
alter table t1 engine=myisam transactional=1;
Warnings:
Warning 1911 Unknown option 'transactional'
alter table t2 engine=myisam transactional=default;
Warnings:
Warning 1911 Unknown option 'transactional'
show create table t0;
Table Create Table
t0 CREATE TABLE `t0` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci TRANSACTIONAL=0
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci TRANSACTIONAL=1
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
drop table t0,t1,t2;
create table t1 (a int) foo=bar;
Warnings:
Warning 1911 Unknown option 'foo'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `foo`='bar'
set sql_mode=default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci /* `foo`='bar' */
alter table t1 engine=aria bar=foo;
ERROR HY000: Unknown option 'bar'
alter table t1 engine=aria;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1 /* `foo`='bar' */
drop table t1;
# End of 10.5 tests
#
# MDEV-39776 SHOW CREATE TABLE corrupts `-quoted table options
#
set sql_mode='ignore_bad_table_options';
create table t1 (a int) `bad opt`=1;
ERROR HY000: Unknown option 'bad opt'
create table t1 (a int) `opt`=`two words`, opt1='*/ oops1 ';
Warnings:
Warning 1911 Unknown option 'opt'
Warning 1911 Unknown option 'opt1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `opt`='two words' `opt1`='*/ oops1 '
set sql_mode=default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci /* `opt`='two words' `opt1`='*\/ oops1 ' */
show table status like 't1';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
t1 MyISAM 10 . 0 0 0 . 1024 0 NULL . . NULL utf8mb4_uca1400_ai_ci NULL `opt`='two words' `opt1`='*/ oops1 '  . N
select create_options from information_schema.tables where table_name='t1';
create_options
`opt`='two words' `opt1`='*/ oops1 '
drop table t1;
# End of 10.6 tests

Messung V0.5 in Prozent
C=73 H=100 G=87

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