mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed new bug in ORDER BY
This commit is contained in:
@ -23,7 +23,7 @@ Warnings:
|
|||||||
Note 1051 Unknown table 't1'
|
Note 1051 Unknown table 't1'
|
||||||
Note 1051 Unknown table 't2'
|
Note 1051 Unknown table 't2'
|
||||||
create table t1 (b char(0) not null, index(b));
|
create table t1 (b char(0) not null, index(b));
|
||||||
The used table handler can't index column 'b'
|
The used storage engine can't index column 'b'
|
||||||
create table t1 (a int not null auto_increment,primary key (a)) type=heap;
|
create table t1 (a int not null auto_increment,primary key (a)) type=heap;
|
||||||
create table t1 (a int not null,b text) type=heap;
|
create table t1 (a int not null,b text) type=heap;
|
||||||
The used table type doesn't support BLOB/TEXT columns
|
The used table type doesn't support BLOB/TEXT columns
|
||||||
@ -269,6 +269,8 @@ SELECT @@table_type;
|
|||||||
@@table_type
|
@@table_type
|
||||||
GEMINI
|
GEMINI
|
||||||
CREATE TABLE t1 (a int not null);
|
CREATE TABLE t1 (a int not null);
|
||||||
|
Warnings:
|
||||||
|
Warning 1259 Using storage engine MYISAM for table 't1'
|
||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
|
@ -347,7 +347,7 @@ a 1
|
|||||||
hello 1
|
hello 1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a text, key (a(300)));
|
create table t1 (a text, key (a(300)));
|
||||||
Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the table handler doesn't support unique sub keys
|
Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the store engine doesn't support unique sub keys
|
||||||
create table t1 (a text, key (a(255)));
|
create table t1 (a text, key (a(255)));
|
||||||
drop table t1;
|
drop table t1;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
|
@ -3436,7 +3436,7 @@ static void update_depend_map(JOIN *join)
|
|||||||
uint i;
|
uint i;
|
||||||
for (i=0 ; i < ref->key_parts ; i++,item++)
|
for (i=0 ; i < ref->key_parts ; i++,item++)
|
||||||
depend_map|=(*item)->used_tables();
|
depend_map|=(*item)->used_tables();
|
||||||
ref->depend_map=depend_map & OUTER_REF_TABLE_BIT;
|
ref->depend_map=depend_map & ~OUTER_REF_TABLE_BIT;
|
||||||
depend_map&= ~OUTER_REF_TABLE_BIT;
|
depend_map&= ~OUTER_REF_TABLE_BIT;
|
||||||
for (JOIN_TAB **tab=join->map2table;
|
for (JOIN_TAB **tab=join->map2table;
|
||||||
depend_map ;
|
depend_map ;
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
# Implemention of my_strtoll(): Converting a string to a 64 bit integer.
|
# Implemention of my_strtoll(): Converting a string to a 64 bit integer.
|
||||||
|
# For documentation, check my_strtoll.c
|
||||||
|
|
||||||
.file "my_strtoll10-x86.s"
|
.file "my_strtoll10-x86.s"
|
||||||
.version "01.01"
|
.version "01.01"
|
||||||
@ -62,7 +63,6 @@ my_strtoll10:
|
|||||||
movl 8(%ebp),%esi # esi= nptr
|
movl 8(%ebp),%esi # esi= nptr
|
||||||
movl 16(%ebp),%ecx # ecx= error (Will be overwritten later)
|
movl 16(%ebp),%ecx # ecx= error (Will be overwritten later)
|
||||||
movl 12(%ebp),%eax # eax= endptr
|
movl 12(%ebp),%eax # eax= endptr
|
||||||
cld # Move forward in esi
|
|
||||||
cmpl $0,%eax # if (endptr)
|
cmpl $0,%eax # if (endptr)
|
||||||
je .L110
|
je .L110
|
||||||
|
|
||||||
@ -72,7 +72,8 @@ my_strtoll10:
|
|||||||
.L100:
|
.L100:
|
||||||
cmpl %ebx,%esi
|
cmpl %ebx,%esi
|
||||||
je .Lno_conv
|
je .Lno_conv
|
||||||
lodsb # al= next byte
|
movb (%esi), %al # al= next byte
|
||||||
|
incl %esi
|
||||||
cmpb $32,%al # Skip space
|
cmpb $32,%al # Skip space
|
||||||
je .L100
|
je .L100
|
||||||
cmpb $9,%al # Skip tab
|
cmpb $9,%al # Skip tab
|
||||||
@ -86,7 +87,8 @@ my_strtoll10:
|
|||||||
movl %edi,12(%ebp) # endptr= &dummy, for easier end check
|
movl %edi,12(%ebp) # endptr= &dummy, for easier end check
|
||||||
.p2align 4,,7
|
.p2align 4,,7
|
||||||
.L120:
|
.L120:
|
||||||
lodsb # al= next byte
|
movb (%esi), %al # al= next byte
|
||||||
|
incl %esi
|
||||||
cmpb $32,%al
|
cmpb $32,%al
|
||||||
je .L120
|
je .L120
|
||||||
cmpb $9,%al
|
cmpb $9,%al
|
||||||
@ -120,21 +122,23 @@ my_strtoll10:
|
|||||||
.L460:
|
.L460:
|
||||||
cmpl %ebx,%esi # Check if overflow
|
cmpl %ebx,%esi # Check if overflow
|
||||||
je .Lno_conv
|
je .Lno_conv
|
||||||
lodsb # al= next byte after sign
|
movb (%esi), %al # al= next byte after sign
|
||||||
|
incl %esi
|
||||||
|
|
||||||
# Remove pre zero to be able to handle a lot of pre-zero
|
# Remove pre zero to be able to handle a lot of pre-zero
|
||||||
.L462:
|
.L462:
|
||||||
cmpb $48,%al
|
cmpb $48,%al
|
||||||
jne .L475 # Number doesn't start with 0
|
jne .L475 # Number doesn't start with 0
|
||||||
movl %esi, %edi
|
decl %esi
|
||||||
.p2align 4,,7
|
.p2align 4,,7
|
||||||
.L481: # Skip pre zeros
|
|
||||||
|
# Skip pre zeros
|
||||||
|
.L481:
|
||||||
|
incl %esi # Skip processed byte
|
||||||
cmpl %ebx,%esi
|
cmpl %ebx,%esi
|
||||||
je .Lms_return_zero
|
je .Lms_return_zero
|
||||||
scasb
|
cmpb (%esi),%al # Test if next byte is also zero
|
||||||
je .L481
|
je .L481
|
||||||
movl %edi, %esi
|
|
||||||
decl %esi # Point to last non '0' digit
|
|
||||||
leal 9(%esi),%ecx # ecx = end-of-current-part
|
leal 9(%esi),%ecx # ecx = end-of-current-part
|
||||||
xorl %edi,%edi # Store first 9 digits in edi
|
xorl %edi,%edi # Store first 9 digits in edi
|
||||||
jmp .L482
|
jmp .L482
|
||||||
@ -158,7 +162,8 @@ my_strtoll10:
|
|||||||
|
|
||||||
.p2align 4,,7
|
.p2align 4,,7
|
||||||
.L488:
|
.L488:
|
||||||
lodsb # al= next byte
|
movb (%esi), %al # al= next byte
|
||||||
|
incl %esi
|
||||||
addb $-48,%al
|
addb $-48,%al
|
||||||
cmpb $9,%al
|
cmpb $9,%al
|
||||||
ja .Lend_i_dec_esi
|
ja .Lend_i_dec_esi
|
||||||
@ -187,7 +192,8 @@ my_strtoll10:
|
|||||||
|
|
||||||
.p2align 4,,7
|
.p2align 4,,7
|
||||||
.L498:
|
.L498:
|
||||||
lodsb # al= next byte
|
movb (%esi), %al # al= next byte
|
||||||
|
incl %esi
|
||||||
addb $-48,%al
|
addb $-48,%al
|
||||||
cmpb $9,%al
|
cmpb $9,%al
|
||||||
ja .Lend_i_and_j_decl_esi
|
ja .Lend_i_and_j_decl_esi
|
||||||
@ -299,7 +305,7 @@ my_strtoll10:
|
|||||||
cmpl $0,-20(%ebp)
|
cmpl $0,-20(%ebp)
|
||||||
je .Lreturn_save_endptr # Positive number
|
je .Lreturn_save_endptr # Positive number
|
||||||
negl %eax
|
negl %eax
|
||||||
cltd # Negetive result in edx:eax
|
cltd # Neg result in edx:eax
|
||||||
jmp .Lreturn_save_endptr
|
jmp .Lreturn_save_endptr
|
||||||
|
|
||||||
# Return value (%ebp-8) * lfactor[(uint) (edx-start)] + edi
|
# Return value (%ebp-8) * lfactor[(uint) (edx-start)] + edi
|
||||||
|
@ -33,7 +33,7 @@ static unsigned long lfactor[9]=
|
|||||||
Convert a string to an to unsigned long long integer value
|
Convert a string to an to unsigned long long integer value
|
||||||
|
|
||||||
SYNOPSYS
|
SYNOPSYS
|
||||||
str2ull10(char *nptr, char **enptr, *long error)
|
my_strtoll10()
|
||||||
nptr in pointer to the string to be converted
|
nptr in pointer to the string to be converted
|
||||||
endptr in/out pointer to the end of the string/
|
endptr in/out pointer to the end of the string/
|
||||||
pointer to the stop character
|
pointer to the stop character
|
||||||
|
Reference in New Issue
Block a user