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
23de67ef
Commit
23de67ef
authored
Oct 07, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after merging fix
parent
7af2a5b1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
10 deletions
+14
-10
BUILD/compile-pentium-debug
BUILD/compile-pentium-debug
+2
-2
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+1
-1
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+1
-1
sql/net_pkg.cc
sql/net_pkg.cc
+2
-0
sql/sql_parse.cc
sql/sql_parse.cc
+2
-2
sql/sql_select.cc
sql/sql_select.cc
+6
-4
No files found.
BUILD/compile-pentium-debug
View file @
23de67ef
...
...
@@ -6,8 +6,8 @@ path=`dirname $0`
extra_flags
=
"
$pentium_cflags
$debug_cflags
"
c_warnings
=
"
$c_warnings
$debug_extra_warnings
"
cxx_warnings
=
"
$cxx_warnings
$debug_extra_warnings
"
extra_configs
=
"
$pentium_configs
$debug_configs
$static_link
"
extra_configs
=
"
$pentium_configs
$debug_configs
"
extra_configs
=
"
$extra_configs
$static_link
"
extra_configs
=
"
$extra_configs
"
.
"
$path
/FINISH.sh"
mysql-test/r/subselect.result
View file @
23de67ef
...
...
@@ -121,7 +121,7 @@ id select_type table type possible_keys key key_len ref rows Extra
2 DEPENDENT SUBSELECT t1 system NULL NULL NULL NULL 1 where used
3 DEPENDENT UNION t5 ALL NULL NULL NULL NULL 2 where used
select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2;
Subselect return more than 1 record
Subselect return
s
more than 1 record
create table attend (patient_uq int, clinic_uq int, index i1 (clinic_uq));
create table clinic( uq int primary key, name char(25));
insert into clinic values(1,"Oblastnaia bolnitsa"),(2,"Bolnitsa Krasnogo Kresta");
...
...
mysql-test/t/subselect.test
View file @
23de67ef
...
...
@@ -45,7 +45,7 @@ select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a)
insert
into
t5
values
(
2
);
select
(
select
a
from
t1
where
t1
.
a
=
t2
.
a
union
select
a
from
t5
where
t5
.
a
=
t2
.
a
),
a
from
t2
;
explain
select
(
select
a
from
t1
where
t1
.
a
=
t2
.
a
union
select
a
from
t5
where
t5
.
a
=
t2
.
a
),
a
from
t2
;
--
error
12
3
0
--
error
12
4
0
select
(
select
a
from
t1
where
t1
.
a
=
t2
.
a
union
all
select
a
from
t5
where
t5
.
a
=
t2
.
a
),
a
from
t2
;
create
table
attend
(
patient_uq
int
,
clinic_uq
int
,
index
i1
(
clinic_uq
));
create
table
clinic
(
uq
int
primary
key
,
name
char
(
25
));
...
...
sql/net_pkg.cc
View file @
23de67ef
...
...
@@ -66,6 +66,8 @@ void send_error(THD *thd, uint sql_errno, const char *err)
else
{
length
=
(
uint
)
strlen
(
err
);
set_if_smaller
(
length
,
MYSQL_ERRMSG_SIZE
-
1
);
}
VOID
(
net_write_command
(
net
,(
uchar
)
255
,
""
,
0
,
(
char
*
)
err
,
length
));
thd
->
fatal_error
=
0
;
// Error message is given
thd
->
net
.
report_error
=
0
;
...
...
sql/sql_parse.cc
View file @
23de67ef
...
...
@@ -1339,7 +1339,7 @@ mysql_execute_command(THD *thd)
{
if
(
!
(
explain_result
=
new
select_send
()))
{
send_error
(
&
thd
->
net
,
ER_OUT_OF_RESOURCES
);
send_error
(
thd
,
ER_OUT_OF_RESOURCES
);
DBUG_VOID_RETURN
;
}
//check rights
...
...
@@ -1478,7 +1478,7 @@ mysql_execute_command(THD *thd)
if
(
!
explain_result
)
if
(
!
(
explain_result
=
new
select_send
()))
{
send_error
(
&
thd
->
net
,
ER_OUT_OF_RESOURCES
);
send_error
(
thd
,
ER_OUT_OF_RESOURCES
);
DBUG_VOID_RETURN
;
}
else
...
...
sql/sql_select.cc
View file @
23de67ef
...
...
@@ -154,8 +154,8 @@ int handle_select(THD *thd, LEX *lex, select_result *result)
{
int
res
;
register
SELECT_LEX
*
select_lex
=
&
lex
->
select_lex
;
if
(
select_lex
->
next_select
())
fix_tables_pointers
(
select_lex
);
if
(
select_lex
->
next_select
())
res
=
mysql_union
(
thd
,
lex
,
result
);
else
res
=
mysql_select
(
thd
,(
TABLE_LIST
*
)
select_lex
->
table_list
.
first
,
...
...
@@ -171,7 +171,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result)
result
->
abort
();
if
(
res
||
thd
->
net
.
report_error
)
{
send_error
(
&
thd
->
net
,
0
,
MYF
(
0
));
send_error
(
thd
,
0
,
MYF
(
0
));
res
=
1
;
}
delete
result
;
...
...
@@ -7215,6 +7215,8 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
String
tmp2
(
buff2
,
sizeof
(
buff2
),
default_charset_info
);
tmp1
.
length
(
0
);
tmp2
.
length
(
0
);
item_list
.
empty
();
item_list
.
push_back
(
new
Item_int
((
int
)
thd
->
lex
.
select
->
select_number
));
item_list
.
push_back
(
new
Item_string
(
thd
->
lex
.
select
->
type
,
strlen
(
thd
->
lex
.
select
->
type
),
...
...
@@ -7224,7 +7226,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
if
(
table
->
tmp_table
==
TMP_TABLE
&&
table
->
derived_select_number
!=
0
)
{
// Derived table name generation
buff
[
512
];
char
buff
[
512
];
int
len
=
my_snprintf
(
buff
,
512
,
"<derived%u>"
,
table
->
derived_select_number
);
item_list
.
push_back
(
new
Item_string
(
buff
,
len
,
default_charset_info
));
...
...
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