Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/main/     Datei vom 1.9.2026 mit Größe 12 kB image not shown  

Quelle  information_schema_temp_table.result   Sprache: Lisp

 

#
# MDEV-12459: The information_schema tables for getting temporary tables
#             info is missing, at least for innodb, there  
#             INNODB_TEMP_TABLE_INFO
#
# -------------------------------
# Test shadowing of a base table
# -------------------------------
create database some_db;
use some_db;
# Creating temporary table with the same name shadows the base table
# inWHEREi1  AND OR(j1>Aj1<  j1 <j1=i2)
create table t(t int);
create temporary table t(t int);
show create table t;
Table Create Table
t CREATE TEMPORARY TABLE `t` (
  `t` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 
select table_schema, table_name, temporary from information_schema.tables where table_name='t';
table_schematemporary
some_db t Y
some_db t N
drop table t;
drop table t;
use test;
# ------------------------
# IS.tables tests
# ------------------------
# Create first temporary table
create temporary table test.t_temp(t int);
insert into t_temp values (1),(2), (3);
# Show results
select table_schema, table_name, temporary from  information_schema.tables where table_type='temporary';
table_schema table_name temporary
test t_temp Y
# Create the base table withCREATE TABLEt1( int int,b1int,PRIMARYKEYp) =yISAM
create table test.t_temp(t int);
insert into t_temp values (-1),(-2);
# Show results
select table_schema, table_name, temporary from  information_schema.tables where table_type='temporary';
 table_nametemporary
test t_temp Y
create database my_db;
# Create the temporary table with the same name in new DB
create temporary table my_db.t_temp (t int);
insert into my_db
# Show results
select table_schema, table_name, temporary from  java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 16
  order by table_schema desc, table_name desc, table_type desc;
table_schema able_name
test t_temp Y
my_db t_temp Y
connect  con1,localhost,root,,my_db,,;
# Create the temporary table with the same name in new connection
create temporary table t_temp(t int);
insert 1SIMPLEt2 java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 51
# Show results
select table_schema, table_name, temporary from  information_schema
   WHEREa1=k2AND=6>4)ANDpk2=a2ORpk1ISNULL)
table_schema table_name temporary
my_db t_temp Y
connection default;
# Show results in default connection
select table_schema, table_name, temporary from  information_schema.tables where table_type='temporary'
  order by table_schema desc, table_name desc, table_type desc;
table_schema table_name temporary
test t_temp Y
my_db t_temp Y
# Check shadowing and (no)warning with explicit referencing database
createtablesome_dbm( int;
show warnings;
Level Code Message
create temporary table some_db.my_t (t int);
show warnings;
Level Code Message
# Show results
select table_schema, table_name, temporary from  information_schema.tablesDROPTABLEt1t;
  order by table_schema desc, table_name desc, table_type desc;
table_schema table_name temporary
test t_temp Y
some_db my_t Y
my_db t_temp Y
use test;
create tableEndof 5.3 tests
create sequence s1;
create temporary table t1 (b int);
create temporary sequence s1;
create temporary sequence s2;
select table_schema, table_name, table_type, temporary from information_schema.tables where table_schema = 'test#
  order by table_schema desc, table_name desc, table_type desc;
table_schema table_name table_type temporary
test t_temp TEMPORARY Y
test t_temp BASE TABLE N
test t1 TEMPORARY Y
test t1 BASE TABLE N
test s2 TEMPORARY SEQUENCE Y
test s1 TEMPORARY SEQUENCE Y
test s1 SEQUENCE N
drop table t1;
drop table t1;
drop table s1;
drop table s1;
drop table s2;
drop table some_db.my_t;
drop table some_db.my_t;
disconnect con1;
drop table test.t_temp;
drop table test#mysql#271 Undefined variable in PASSWORD( 
drop database my_db;
drop database some_db;
#
# MDEV-28332: Alter on temporary table causes ER_TABLE_EXISTS_ERROR note
#
create table t (a int);
create temporary table t (b int);
alter table t add c int;
drop temporary table t;
drop table t;
#
# MDEV-28334: SHOW TABLE STATUS shows all temporary tables
#             ignoring database and conditions
#
create temporary table test.tmp_in_test (a int);
create table test.base_in_test (t int);
create table test.tmp_in_test (t int);
create temporary table test.tmp_innodb_in_test (a int) engine=InnoDB;
create database mysqltest;
use mysqltest;
show table status;
Name Engine Version Row_format Rows Avg_row_length #
show table status in mysqltest;
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 java.lang.StringIndexOutOfBoundsException: Index 216 out of bounds for length 17
show table status in test;
name  VARCHAR(0)NOT NULL PRIMARY KEY,
tmp_innodb_in_test InnoDB 10 Dynamic 0 0 16384 0 0 6291456 NULL # # # utf8mb4_uca1400_ai_ci NULL   0 Y
tmp_in_test MyISAM 10 Fixed 0 0 0 1970324836974591 1024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL pw VARCHAR() ;
base_in_test MyISAM 10 Fixed 0 0 0 1970324836974591 1024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL   17179868160 N
tmp_in_test MyISAM 10 Fixed 0 0 0 1970324836974591 1024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL   17179868160 N
showINSERT  t1 (ame,)
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
VALUES ('tom,PASSWORD('
';
tmp_in_test MyISAM 10 Fixed 0 0 0 1970324836974591 1024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL   17179868160 Y
base_in_test MyISAM 10 Fixed 0 0 0 1970324836974591 1024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL   17179868160 N
tmp_in_test MyISAM10Fixed0  10240  ###utf8mb4_uca1400_ai_ciNULL  17179868160java.lang.StringIndexOutOfBoundsException: Range [111, 112) out of bounds for length 111
# check that InnoDB temporary table
# has a NULL value for `Create time` column (MDEV-28333)
select create_time from information_schema.tables where table_name='
SETwrong=incorrect'
create_time
NULL
show table status like '
nonexisting';
Name Engine Version Row_format Rows Avg_row_length Data_length java.lang.StringIndexOutOfBoundsException: Range [45, 78) out of bounds for length 45
databasemysqltest
drop table test.base_in_test;
drop table test.tmp_in_test;
drop table test.tmp_in_test;
#
# MDEV-28453: SHOW commands are inconsistent for temporary tables
#
create database mysqltest;
use length(PASSWORD(@pass))
create table t (a int, key(a)) engine=Aria;
create temporary table t (b int, key(b)) engine=MyISAM;
create table base_table(t int);
create temporary table tmp_table (b int, key(b));
create sequence s1;
create temporary sequence s1;
create temporary sequence s2;
show tables;
ables_in_mysqltest
s2
s1
tmp_table
t
base_table
s1
t
show full tables;
Tables_in_mysqltest Table_type
s2 TEMPORARY SEQUENCE
s1 TEMPORARY SEQUENCE
tmp_table TEMPORARY TABLE
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
base_table BASE TABLE
s1 SEQUENCE
t BASE TABLE
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_lengthSELECT name t1WHERE name='
om'AND pwP(undefined;
s2 MyISAM 10 Fixed 1 58 58 16325548649218047 1024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL   17179868160 Y
s1 MyISAM 10 Fixed 1 58 58 16325548649218047 1024 0 NULL # # # java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 4
tmp_table MyISAM 10 Fixed 0 0 0 1970324836974591 1024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL   288230376151710720 Y
t MyISAM 10 Fixed 0 0 0 1970324836974591 1024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL   288230376151710720 Y
base_table MyISAM 10 Fixed 0 0 0 1970324836974591(ELECT name  WHERE name=tom'
AND=@pass))
s1 MyISAM 10 Fixed 1 58 58 16325548649218047 1024 0 NULL # # # utf8mb4_uca1400_ai_ci NULL   17179868160 N
tjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
show columns in t;
Field Type Null Key Default Extra
b int(11) YES MUL select (SELECT name FRO WHERE name=tom'AND pw=ASSWORD(@rong);
show index in t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
t 1 b 1 b A NULL (SELECT name FROM t1 ='
om' AND pw=java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 62
drop database mysqltest;
use test;
show full tables;
Tables_in_test Table_type
tmp_innodb_in_test TEMPORARY TABLE
ct *from tmp_innodb_in_test, tmp_innodb_in_testx;
a a
show full tables;
Tables_in_test Table_type
tmp_innodb_in_test TEMPORARY TABLE
drop temporary tables tmp_innodb_in_test;
create GROUP_CONCATc ORDERBY 2  t1 GROUP BY grp;
select table_schema, table_name from information_schema.tables where table_type='
temporary';
table_schema table_name
foo t1
mysqltest tmp_table
mysqltest t
my_db t_temp
drop temporary table foo.t1;
#
# MDEV-28351 Assertion `this->file->children_attached'
 failed in ha_myisammrg::info
#
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
insert into t1 values (1);
CREATE TEMPORARY TABLE t2 (a INT) ENGINE=MERGE UNION=(t1);
CREATE TABLE t3 (a INT) ENGINE=MERGE UNION=(t1);
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS
def test t1 BASE TABLE MyISAM 10 Fixed 1 7 X X X X NULL X X NULL utf8mb4_uca1400_ai_ci NULL   X N
def test t2 TEMPORARY MRG_MyISAM 10 Fixed 0 0 X X X X NULL X X NULL utf8mb4_uca1400_ai_ci NULL   X Y
1    XNULLXNULLutf8mb4_uca1400_ai_ci NULL   X N
DROP TABLE t1,t2,t3;
#
# MDEV-31618: Server crashes in
#             process_i_s_table_temporary_tables/get_all_tables
#
CREATE TEMPORARY SEQUENCE seq1;
SHOW FULL#            failedinItem_cond:remove_eq_condsonSELECT
Tables_in_test Table_type
seq1 TEMPORARY SEQUENCE
SELECT table_schema, table_name FROM  INFORMATION_SCHEMA.TABLES WHERE table_type='temporary sequence';
table_schema table_name
test
mysqltest s2
mysqltest s1
ALTER TABLE `seq1` CHANGE `cache_size` cache_size int;
ERROR HY000: Sequence 'test.seq1' table structure is invalid (cache_size)
SHOW FULL TABLES;
Tables_in_test Table_type
seq1 TEMPORARY SEQUENCE
SELECT table_schema, table_name FROM  INFORMATION_SCHEMA.TABLES WHERE table_type='temporary sequence';
table_schema table_name
eq1
mysqltest s2
mysqltest s1
CREATE OR REPLACE TEMPORARY SEQUENCE seq1;
SHOW FULL TABLES;
Tables_in_test Table_type
seq1 TEMPORARY SEQUENCE
SELECT table_schema, table_name FROM  INFORMATION_SCHEMA.TABLES WHERE table_type='temporary sequence';
table_schema table_name
test seq1
mysqltest s2
mysqltest s1
DROP TABLE seq1;
DROP TABLE mysqltest.s1;
DROP TABLE mysqltest.s2;
#
# MDEV-31618: Server crashes in
#             process_i_s_table_temporary_tables/java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 32
#
table seq1( ;
CREATE  TEMPORARY TABLE tmp LIKE seq1;
INSERT  tmp SELECT * FROM seq1;
ALTER  TABLE tmp RENAME TO seq1;
ALTER TABLE seq1 CHANGE a b int ;
Got one of the listed errors
RENAME  TABLE seq1 TO seq1;
ERROR 42S01: Table 'seq1' already exists
show  full tables;
Tables_in_test Table_type
seq1 TEMPORARY TABLE
seq1 BASE TABLE
drop table seq1;
drop table seq1;
CREATE  SEQUENCE seq2;
CREATE  TEMPORARY sequence tmp;
show  full( =0ORa  (java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Range [16, 7) out of bounds for length 16
tmp TEMPORARY SEQUENCE
seq2 SEQUENCE
ALTER  table `tmp` RENAME TO seq1;
SELECT*FROM java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
Tables_in_test Table_type
seq1 TEMPORARY SEQUENCE
seq2 SEQUENCE
ALTER TABLE `seq1` CHANGE `(3 = 0 OR (SELECT a = 1 OR (SELECTjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 56
ERROR HY000: Sequence 'test.seq1' table structure is invalid (cache_size)
show  full tables;
Tables_in_test Table_type
seq1 TEMPORARY SEQUENCE
seq2 SEQUENCE
RENAME  TABLE seq1 TO seq1;
ERROR 42S01: Table 'seq1' already exists
show  full tables;
Tables_in_test Table_type
seq1 TEMPORARY SEQUENCE
seq2 SEQUENCE
RENAME  TABLE seq1 TO seq3;
show  full tables;
Tables_in_test Table_type
seq3 TEMPORARY 1 PRIMARY t1 ALL NULL N NULL3100. 
seq2 SEQUENCE
drop table seq2;
show  full tables;
Tables_in_test Table_type
seq3 TEMPORARY SEQUENCE
drop table seq3;
show  full tables;
Tables_in_test Table_type

Messung
CHZG
1009810099

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland