1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

MDEV-7679: ANALYZE crashes when printing WHERE when no default db

Fix Item_ident::print() to work when there is no current database
This commit is contained in:
Sergei Petrunia
2015-03-07 20:51:35 +03:00
parent 66ad265f3b
commit 2288b84df4
3 changed files with 47 additions and 1 deletions

View File

@@ -210,3 +210,32 @@ EXPLAIN
}
}
drop table t1,t2;
create table t1(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
#
# MDEV-7679: ANALYZE crashes when printing WHERE when no default db
#
select database();
database()
test
select database();
database()
NULL
analyze format=json select * from test.t1 where t1.a<5;
EXPLAIN
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "t1",
"access_type": "ALL",
"r_loops": 1,
"rows": 10,
"r_rows": 10,
"filtered": 100,
"r_filtered": 50,
"attached_condition": "(test.t1.a < 5)"
}
}
}
drop table t1;