mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
This commit is contained in:
@ -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;
|
||||||
|
@ -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 ';
|
||||||
|
@ -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 ';
|
||||||
|
@ -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 ';
|
||||||
|
@ -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
|
|||||||
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 ';
|
||||||
|
@ -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 ';
|
||||||
|
@ -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),
|
||||||
|
Reference in New Issue
Block a user