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 1 kB image not shown  

Quelle  table_options_notembedded.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: SQL {SQL[133] ABAP[58] Lisp[45]} [Methode: maximale Elemente, drei Dimensionen]

#
# MDEV-5867 ALTER TABLE t1 ENGINE=InnoDB keeps bad options when t1 ENGINE is CONNECT
#
# verify that SHOW CREATE TABLE hides unknown options when IGNORE_BAD_TABLE_OPTIONS is not set

--source include/have_example_plugin.inc
--source include/not_embedded.inc

install soname 'ha_example';

set sql_mode='ignore_bad_table_options';
create table t1 (
  a int complex='c,f,f,f' invalid=3
) engine=example ull=10000 str='dskj' one_or_two='one' yesno=0
  foobar=barfoo;

create table t2 (a int, key (a) some_option=2014);

show create table t1;
SELECT TABLE_NAME, COLUMN_NAME, CREATE_OPTIONS FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
show create table t2;
SELECT TABLE_NAME, INDEX_NAME, CREATE_OPTIONS FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME='t2';

set sql_mode='';

show create table t1;
SELECT TABLE_NAME, COLUMN_NAME, CREATE_OPTIONS FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
show create table t2;
SELECT TABLE_NAME, INDEX_NAME, CREATE_OPTIONS FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME='t2';

drop table t1, t2;

uninstall soname 'ha_example';

--echo #
--echo # MDEV-39776 SHOW CREATE TABLE corrupts `-quoted table options
--echo #
set sql_mode='ignore_bad_table_options';
create table t1 (a int) opt1='*\/ oops1 ' opt2=`*/oops2 `;
show create table t1;
set sql_mode=default;
show create table t1;
--exec $MYSQL_DUMP --compact test t1 > $MYSQL_TMP_DIR/t1.sql
--cat_file $MYSQL_TMP_DIR/t1.sql
drop table t1;
--exec $MYSQL test < $MYSQL_TMP_DIR/t1.sql
show create table t1;
drop table t1;
--remove_file $MYSQL_TMP_DIR/t1.sql

--echo # End of 10.6 tests

[Dauer der Verarbeitung: 0.11 Sekunden, vorverarbeitet 2026-10-08]