Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b233ddba
Commit
b233ddba
authored
Feb 03, 2005
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After merge fixes
parent
43eb7cf3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
27 deletions
+22
-27
mysql-test/r/derived.result
mysql-test/r/derived.result
+5
-5
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+0
-6
sql/item.cc
sql/item.cc
+1
-1
sql/sql_show.cc
sql/sql_show.cc
+16
-15
No files found.
mysql-test/r/derived.result
View file @
b233ddba
...
...
@@ -330,11 +330,6 @@ SELECT MIN(price) min, MAX(price) max, AVG(price) avg FROM (SELECT SUBSTRING( MA
min max avg
10.00 10.00 10
DROP TABLE t1;
CREATE TABLE t1 (a char(10), b char(10));
INSERT INTO t1 VALUES ('root','localhost'), ('root','%');
SELECT * FROM (SELECT (SELECT a.a FROM t1 AS a WHERE a.a = b.a) FROM t1 AS b) AS c;
ERROR 21000: Subquery returns more than 1 row
DROP TABLE t1;
create table t1 (a integer, b integer);
insert into t1 values (1,4), (2,2),(2,2), (4,1),(4,1),(4,1),(4,1);
select distinct sum(b) from t1 group by a;
...
...
@@ -344,3 +339,8 @@ select distinct sum(b) from (select a,b from t1) y group by a;
sum(b)
4
drop table t1;
CREATE TABLE t1 (a char(10), b char(10));
INSERT INTO t1 VALUES ('root','localhost'), ('root','%');
SELECT * FROM (SELECT (SELECT a.a FROM t1 AS a WHERE a.a = b.a) FROM t1 AS b) AS c;
ERROR 21000: Subquery returns more than 1 row
DROP TABLE t1;
mysql-test/r/func_str.result
View file @
b233ddba
...
...
@@ -707,12 +707,6 @@ select count(*) as total, left(c,10) as reg from t1 group by reg order by reg de
total reg
10 2004-12-10
drop table t1;
select quote(ltrim(concat(' ', 'a')));
quote(ltrim(concat(' ', 'a')))
'a'
select quote(trim(concat(' ', 'a')));
quote(trim(concat(' ', 'a')))
'a'
select trim(null from 'kate') as "must_be_null";
must_be_null
NULL
...
...
sql/item.cc
View file @
b233ddba
...
...
@@ -1775,7 +1775,7 @@ resolve_ref_in_select_and_group(THD *thd, Item_ident *ref, SELECT_LEX *select)
if
(
select_ref
!=
not_found_item
&&
!
ambiguous_fields
)
{
DBUG_ASSERT
(
*
select_ref
);
if
(
!
las
t
->
ref_pointer_array
[
counter
])
if
(
!
selec
t
->
ref_pointer_array
[
counter
])
{
my_error
(
ER_ILLEGAL_REFERENCE
,
MYF
(
0
),
ref
->
name
,
"forward reference in item list"
);
...
...
sql/sql_show.cc
View file @
b233ddba
...
...
@@ -1786,7 +1786,9 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
enum
enum_schema_tables
schema_table_idx
;
thr_lock_type
lock_type
;
List
<
char
>
bases
;
List_iterator_fast
<
char
>
it
(
bases
);
COND
*
partial_cond
;
int
error
=
1
;
DBUG_ENTER
(
"get_all_tables"
);
LINT_INIT
(
end
);
...
...
@@ -1803,13 +1805,11 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
if
(
schema_table
->
process_table
(
thd
,
show_table_list
,
table
,
res
,
show_table_list
->
db
,
show_table_list
->
alias
))
{
DBUG_RETURN
(
1
);
}
goto
err
;
close_thread_tables
(
thd
,
0
,
0
,
old_open_tables
);
show_table_list
->
table
=
0
;
lex
->
all_selects_list
=
select_lex
;
DBUG_RETURN
(
0
)
;
error
=
0
;
goto
err
;
}
lex
->
all_selects_list
=
&
sel
;
...
...
@@ -1822,14 +1822,14 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
/* information schema name always is first in list */
if
(
schema_db_add
(
thd
,
&
bases
,
idx_field_vals
.
db_value
,
&
with_i_schema
))
return
1
;
goto
err
;
if
(
mysql_find_files
(
thd
,
&
bases
,
NullS
,
mysql_data_home
,
idx_field_vals
.
db_value
,
1
))
return
1
;
goto
err
;
List_iterator_fast
<
char
>
it
(
bases
);
partial_cond
=
make_cond_for_info_schema
(
cond
,
tables
);
it
.
rewind
();
/* To get access to new elements in basis list */
while
((
base_name
=
it
++
)
||
/*
generate error for non existing database.
...
...
@@ -1851,7 +1851,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
if
(
with_i_schema
)
// information schema table names
{
if
(
schema_tables_add
(
thd
,
&
files
,
idx_field_vals
.
table_value
))
DBUG_RETURN
(
1
)
;
goto
err
;
}
else
{
...
...
@@ -1860,7 +1860,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
len
=
FN_LEN
-
len
;
if
(
mysql_find_files
(
thd
,
&
files
,
base_name
,
path
,
idx_field_vals
.
table_value
,
0
))
DBUG_RETURN
(
1
)
;
goto
err
;
}
List_iterator_fast
<
char
>
it_files
(
files
);
...
...
@@ -1906,16 +1906,14 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
int
res
;
TABLE
*
old_open_tables
=
thd
->
open_tables
;
if
(
make_table_list
(
thd
,
&
sel
,
base_name
,
file_name
))
DBUG_RETURN
(
1
)
;
goto
err
;
TABLE_LIST
*
show_table_list
=
(
TABLE_LIST
*
)
sel
.
table_list
.
first
;
show_table_list
->
lock_type
=
lock_type
;
res
=
open_and_lock_tables
(
thd
,
show_table_list
);
if
(
schema_table
->
process_table
(
thd
,
show_table_list
,
table
,
res
,
base_name
,
show_table_list
->
alias
))
{
DBUG_RETURN
(
1
);
}
goto
err
;
close_thread_tables
(
thd
,
0
,
0
,
old_open_tables
);
}
}
...
...
@@ -1927,8 +1925,11 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
with_i_schema
=
0
;
}
}
error
=
0
;
err:
lex
->
all_selects_list
=
select_lex
;
DBUG_RETURN
(
0
);
DBUG_RETURN
(
error
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment