[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.137.182.206: ~ $
# Check that non-utf8 characters are ok

--source include/have_optimizer_trace.inc

# --ps-protocol gives different trace where view
# has already been materialized
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL
            + $VIEW_PROTOCOL > 0`)
{
   --skip Need normal protocol
}

set @@session.end_markers_in_json=on;
set @@session.optimizer_trace="enabled=on";
create table t1(a int);
insert into t1 values(1);

# test non-utf8 chars in the SELECT list

set names latin1;
# The 5 'A's below are, in this file's bytes, written in latin1
# encoding: xC1C2C4C4C5. We send them as latin1; the server interprets
# them as characters using latin1, then encodes those characters in
# utf8 in the trace; sends back the trace but re-encodes it in latin1
# (as this is how we want it, see "set names latin1".
explain extended select '�����', _latin1'�����' from t1 limit 1;
select (@query:=QUERY)+NULL, (@trace:=TRACE)+NULL from information_schema.OPTIMIZER_TRACE;
select @query, @trace;
# The trace above is not valid JSON because the client asked to
# receive it encoded in latin1, whereas JSON wants it in utf8.
# Let's get it in utf8.
set names utf8;
select @query, @trace;

# test non-utf8 chars in a view's definition

set names latin1;
create view v1 as select '�����' as col from t1 limit 1;
select * from v1 where v1.col = '�����';
select (@query:=QUERY)+NULL, (@trace:=TRACE)+NULL from information_schema.OPTIMIZER_TRACE;
set names utf8;
select @query, @trace;

drop table t1;
drop view v1;

# test non-ASCII chars in a range

set names latin1;
create table t1(c char(4) primary key);
insert into t1 values ('aaa'), ('����');
select * from t1 where c < '�����';
select (@query:=QUERY)+NULL, (@trace:=TRACE)+NULL from information_schema.OPTIMIZER_TRACE;
set names utf8;
select @query, @trace;
drop table t1;

# test newline and tabulation chars in an identifier
create table `t
1	a`(`col
1	a` int, index `index
1	a` (`col
1	a`));
insert into `t
1	a` values(2),(3);
create view `v
1	a` as select * from `t
1	a`;
select `col
1	a` from `v
1	a` where `col
1	a` < 6;
select query, trace from information_schema.OPTIMIZER_TRACE;
drop table `t
1	a`;
drop view `v
1	a`;

set optimizer_trace=default;

Filemanager

Name Type Size Permission Actions
bugs_no_prot_all.test File 541 B 0644
bugs_no_prot_none.test File 652 B 0644
bugs_ps_prot_all.test File 538 B 0644
bugs_ps_prot_none.test File 649 B 0644
charset.test File 2.16 KB 0644
debug.test File 1010 B 0644
eq_range_statistics.test File 3.21 KB 0644
filesort_pq.test File 174 B 0644
general2_no_prot.test File 202 B 0644
general2_ps_prot.test File 199 B 0644
general_no_prot_all.test File 570 B 0644
general_no_prot_none.test File 681 B 0644
general_ps_prot_all.test File 567 B 0644
general_ps_prot_none.test File 678 B 0644
range_no_prot.test File 199 B 0644
range_ps_prot.test File 196 B 0644
security_no_prot.test File 202 B 0644
security_ps_prot.test File 199 B 0644
subquery_no_prot.test File 202 B 0644
subquery_ps_prot.test File 199 B 0644
temp_table.test File 2.45 KB 0644