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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
1cd522ec
Commit
1cd522ec
authored
Jul 21, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
parents
8df1bf6b
cb35648e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
1 deletion
+66
-1
mysql-test/include/ps_query.inc
mysql-test/include/ps_query.inc
+5
-0
mysql-test/r/ps_2myisam.result
mysql-test/r/ps_2myisam.result
+10
-0
mysql-test/r/ps_3innodb.result
mysql-test/r/ps_3innodb.result
+10
-0
mysql-test/r/ps_4heap.result
mysql-test/r/ps_4heap.result
+10
-0
mysql-test/r/ps_5merge.result
mysql-test/r/ps_5merge.result
+20
-0
mysql-test/r/ps_6bdb.result
mysql-test/r/ps_6bdb.result
+10
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
mysql-test/include/ps_query.inc
View file @
1cd522ec
...
@@ -246,6 +246,11 @@ select a,b from t1 order by 2 ;
...
@@ -246,6 +246,11 @@ select a,b from t1 order by 2 ;
prepare
stmt1
from
' select a,b from t1
prepare
stmt1
from
' select a,b from t1
order by ? '
;
order by ? '
;
execute
stmt1
using
@
arg00
;
execute
stmt1
using
@
arg00
;
set
@
arg00
=
1
;
execute
stmt1
using
@
arg00
;
set
@
arg00
=
0
;
--
error
1054
execute
stmt1
using
@
arg00
;
##### parameter used in limit clause
##### parameter used in limit clause
set
@
arg00
=
1
;
set
@
arg00
=
1
;
...
...
mysql-test/r/ps_2myisam.result
View file @
1cd522ec
...
@@ -334,6 +334,16 @@ a b
...
@@ -334,6 +334,16 @@ a b
1 one
1 one
3 three
3 three
2 two
2 two
set @arg00=1 ;
execute stmt1 using @arg00;
a b
1 one
2 two
3 three
4 four
set @arg00=0 ;
execute stmt1 using @arg00;
ERROR 42S22: Unknown column '?' in 'order clause'
set @arg00=1;
set @arg00=1;
prepare stmt1 from ' select a,b from t1
prepare stmt1 from ' select a,b from t1
limit 1 ';
limit 1 ';
...
...
mysql-test/r/ps_3innodb.result
View file @
1cd522ec
...
@@ -334,6 +334,16 @@ a b
...
@@ -334,6 +334,16 @@ a b
1 one
1 one
3 three
3 three
2 two
2 two
set @arg00=1 ;
execute stmt1 using @arg00;
a b
1 one
2 two
3 three
4 four
set @arg00=0 ;
execute stmt1 using @arg00;
ERROR 42S22: Unknown column '?' in 'order clause'
set @arg00=1;
set @arg00=1;
prepare stmt1 from ' select a,b from t1
prepare stmt1 from ' select a,b from t1
limit 1 ';
limit 1 ';
...
...
mysql-test/r/ps_4heap.result
View file @
1cd522ec
...
@@ -335,6 +335,16 @@ a b
...
@@ -335,6 +335,16 @@ a b
1 one
1 one
3 three
3 three
2 two
2 two
set @arg00=1 ;
execute stmt1 using @arg00;
a b
1 one
2 two
3 three
4 four
set @arg00=0 ;
execute stmt1 using @arg00;
ERROR 42S22: Unknown column '?' in 'order clause'
set @arg00=1;
set @arg00=1;
prepare stmt1 from ' select a,b from t1
prepare stmt1 from ' select a,b from t1
limit 1 ';
limit 1 ';
...
...
mysql-test/r/ps_5merge.result
View file @
1cd522ec
...
@@ -377,6 +377,16 @@ a b
...
@@ -377,6 +377,16 @@ a b
1 one
1 one
3 three
3 three
2 two
2 two
set @arg00=1 ;
execute stmt1 using @arg00;
a b
1 one
2 two
3 three
4 four
set @arg00=0 ;
execute stmt1 using @arg00;
ERROR 42S22: Unknown column '?' in 'order clause'
set @arg00=1;
set @arg00=1;
prepare stmt1 from ' select a,b from t1
prepare stmt1 from ' select a,b from t1
limit 1 ';
limit 1 ';
...
@@ -1560,6 +1570,16 @@ a b
...
@@ -1560,6 +1570,16 @@ a b
1 one
1 one
3 three
3 three
2 two
2 two
set @arg00=1 ;
execute stmt1 using @arg00;
a b
1 one
2 two
3 three
4 four
set @arg00=0 ;
execute stmt1 using @arg00;
ERROR 42S22: Unknown column '?' in 'order clause'
set @arg00=1;
set @arg00=1;
prepare stmt1 from ' select a,b from t1
prepare stmt1 from ' select a,b from t1
limit 1 ';
limit 1 ';
...
...
mysql-test/r/ps_6bdb.result
View file @
1cd522ec
...
@@ -334,6 +334,16 @@ a b
...
@@ -334,6 +334,16 @@ a b
1 one
1 one
3 three
3 three
2 two
2 two
set @arg00=1 ;
execute stmt1 using @arg00;
a b
1 one
2 two
3 three
4 four
set @arg00=0 ;
execute stmt1 using @arg00;
ERROR 42S22: Unknown column '?' in 'order clause'
set @arg00=1;
set @arg00=1;
prepare stmt1 from ' select a,b from t1
prepare stmt1 from ' select a,b from t1
limit 1 ';
limit 1 ';
...
...
sql/sql_select.cc
View file @
1cd522ec
...
@@ -8000,7 +8000,7 @@ find_order_in_list(THD *thd, Item **ref_pointer_array,
...
@@ -8000,7 +8000,7 @@ find_order_in_list(THD *thd, Item **ref_pointer_array,
Item
*
itemptr
=*
order
->
item
;
Item
*
itemptr
=*
order
->
item
;
if
(
itemptr
->
type
()
==
Item
::
INT_ITEM
)
if
(
itemptr
->
type
()
==
Item
::
INT_ITEM
)
{
/* Order by position */
{
/* Order by position */
uint
count
=
(
uint
)
((
Item_int
*
)
itemptr
)
->
value
;
uint
count
=
itemptr
->
val_int
()
;
if
(
!
count
||
count
>
fields
.
elements
)
if
(
!
count
||
count
>
fields
.
elements
)
{
{
my_printf_error
(
ER_BAD_FIELD_ERROR
,
ER
(
ER_BAD_FIELD_ERROR
),
my_printf_error
(
ER_BAD_FIELD_ERROR
,
ER
(
ER_BAD_FIELD_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