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
b9a671f2
Commit
b9a671f2
authored
Nov 18, 2002
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lot's of fixes with test cases
parent
ae8eb2d9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
7 deletions
+13
-7
mysql-test/r/create.result
mysql-test/r/create.result
+3
-0
mysql-test/r/select_found.result
mysql-test/r/select_found.result
+2
-2
mysql-test/t/create.test
mysql-test/t/create.test
+3
-0
mysql-test/t/select_found.test
mysql-test/t/select_found.test
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+4
-3
sql/sql_union.cc
sql/sql_union.cc
+0
-1
No files found.
mysql-test/r/create.result
View file @
b9a671f2
...
@@ -158,3 +158,6 @@ select * from t1;
...
@@ -158,3 +158,6 @@ select * from t1;
if('2002'='2002','Y','N')
if('2002'='2002','Y','N')
Y
Y
drop table if exists t1;
drop table if exists t1;
create table t1 (a int, key(a));
create table t2 (b int, foreign key(b) references t1(a), key(b));
drop table if exists t1,t2;
mysql-test/r/select_found.result
View file @
b9a671f2
...
@@ -173,9 +173,9 @@ SELECT SQL_CALC_FOUND_ROWS 1 FROM (SELECT 1) LIMIT 0;
...
@@ -173,9 +173,9 @@ SELECT SQL_CALC_FOUND_ROWS 1 FROM (SELECT 1) LIMIT 0;
SELECT FOUND_ROWS();
SELECT FOUND_ROWS();
FOUND_ROWS()
FOUND_ROWS()
1
1
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 0;
SELECT SQL_CALC_FOUND_ROWS * FROM t1
WHERE numeropost > 1
LIMIT 0;
titre numeropost maxnumrep
titre numeropost maxnumrep
SELECT FOUND_ROWS();
SELECT FOUND_ROWS();
FOUND_ROWS()
FOUND_ROWS()
3
2
drop table t1;
drop table t1;
mysql-test/t/create.test
View file @
b9a671f2
...
@@ -110,3 +110,6 @@ drop table t1;
...
@@ -110,3 +110,6 @@ drop table t1;
create
table
t1
select
if
(
'2002'
=
'2002'
,
'Y'
,
'N'
);
create
table
t1
select
if
(
'2002'
=
'2002'
,
'Y'
,
'N'
);
select
*
from
t1
;
select
*
from
t1
;
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
create
table
t1
(
a
int
,
key
(
a
));
create
table
t2
(
b
int
,
foreign
key
(
b
)
references
t1
(
a
),
key
(
b
));
drop
table
if
exists
t1
,
t2
;
mysql-test/t/select_found.test
View file @
b9a671f2
...
@@ -86,6 +86,6 @@ SELECT SQL_CALC_FOUND_ROWS titre,numeropost,maxnumrep FROM t1 WHERE numeropost I
...
@@ -86,6 +86,6 @@ SELECT SQL_CALC_FOUND_ROWS titre,numeropost,maxnumrep FROM t1 WHERE numeropost I
SELECT
FOUND_ROWS
();
SELECT
FOUND_ROWS
();
SELECT
SQL_CALC_FOUND_ROWS
1
FROM
(
SELECT
1
)
LIMIT
0
;
SELECT
SQL_CALC_FOUND_ROWS
1
FROM
(
SELECT
1
)
LIMIT
0
;
SELECT
FOUND_ROWS
();
SELECT
FOUND_ROWS
();
SELECT
SQL_CALC_FOUND_ROWS
*
FROM
t1
LIMIT
0
;
SELECT
SQL_CALC_FOUND_ROWS
*
FROM
t1
WHERE
numeropost
>
1
LIMIT
0
;
SELECT
FOUND_ROWS
();
SELECT
FOUND_ROWS
();
drop
table
t1
;
drop
table
t1
;
sql/sql_select.cc
View file @
b9a671f2
...
@@ -324,6 +324,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
...
@@ -324,6 +324,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
this
->
group
=
group_list
!=
0
;
this
->
group
=
group_list
!=
0
;
row_limit
=
((
select_distinct
||
order
||
group_list
)
?
HA_POS_ERROR
:
row_limit
=
((
select_distinct
||
order
||
group_list
)
?
HA_POS_ERROR
:
unit
->
select_limit_cnt
);
unit
->
select_limit_cnt
);
do_send_rows
=
(
row_limit
)
?
1
:
0
;
this
->
unit
=
unit
;
this
->
unit
=
unit
;
#ifdef RESTRICTED_GROUP
#ifdef RESTRICTED_GROUP
...
@@ -664,7 +665,7 @@ JOIN::exec()
...
@@ -664,7 +665,7 @@ JOIN::exec()
result
->
send_fields
(
fields_list
,
1
);
result
->
send_fields
(
fields_list
,
1
);
if
(
!
having
||
having
->
val_int
())
if
(
!
having
||
having
->
val_int
())
{
{
if
(
do_send_rows
&&
unit
->
select_limit_cnt
&&
result
->
send_data
(
fields_list
))
if
(
do_send_rows
&&
result
->
send_data
(
fields_list
))
error
=
1
;
error
=
1
;
else
else
{
{
...
@@ -2611,8 +2612,8 @@ make_simple_join(JOIN *join,TABLE *tmp_table)
...
@@ -2611,8 +2612,8 @@ make_simple_join(JOIN *join,TABLE *tmp_table)
join
->
sum_funcs
=
0
;
join
->
sum_funcs
=
0
;
join
->
send_records
=
(
ha_rows
)
0
;
join
->
send_records
=
(
ha_rows
)
0
;
join
->
group
=
0
;
join
->
group
=
0
;
join
->
do_send_rows
=
1
;
join
->
row_limit
=
join
->
unit
->
select_limit_cnt
;
join
->
row_limit
=
join
->
unit
->
select_limit_cnt
;
join
->
do_send_rows
=
(
join
->
row_limit
)
?
1
:
0
;
join_tab
->
cache
.
buff
=
0
;
/* No cacheing */
join_tab
->
cache
.
buff
=
0
;
/* No cacheing */
join_tab
->
table
=
tmp_table
;
join_tab
->
table
=
tmp_table
;
...
@@ -5184,7 +5185,7 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
...
@@ -5184,7 +5185,7 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
error
=
0
;
error
=
0
;
if
(
join
->
procedure
)
if
(
join
->
procedure
)
error
=
join
->
procedure
->
send_row
(
*
join
->
fields
);
error
=
join
->
procedure
->
send_row
(
*
join
->
fields
);
else
if
(
join
->
do_send_rows
&&
join
->
unit
->
select_limit_cnt
)
else
if
(
join
->
do_send_rows
)
error
=
join
->
result
->
send_data
(
*
join
->
fields
);
error
=
join
->
result
->
send_data
(
*
join
->
fields
);
if
(
error
)
if
(
error
)
DBUG_RETURN
(
-
1
);
/* purecov: inspected */
DBUG_RETURN
(
-
1
);
/* purecov: inspected */
...
...
sql/sql_union.cc
View file @
b9a671f2
...
@@ -86,7 +86,6 @@ bool select_union::send_data(List<Item> &values)
...
@@ -86,7 +86,6 @@ bool select_union::send_data(List<Item> &values)
}
}
else
else
return
1
;
return
1
;
thd
->
net
.
report_error
=
0
;
// donno why does it work, but it does ...
}
}
return
0
;
return
0
;
}
}
...
...
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