Commit 57edc61b authored by unknown's avatar unknown

Fixed new bug in ORDER BY


mysql-test/r/create.result:
  Update for new error messages
mysql-test/r/type_blob.result:
  Update for new error messages
strings/my_strtoll10-x86.s:
  Faster str->longlong
strings/my_strtoll10.c:
  Updated comments
parent 9f22d166
......@@ -23,7 +23,7 @@ Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 't2'
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,b text) type=heap;
The used table type doesn't support BLOB/TEXT columns
......@@ -269,6 +269,8 @@ SELECT @@table_type;
@@table_type
GEMINI
CREATE TABLE t1 (a int not null);
Warnings:
Warning 1259 Using storage engine MYISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
......
......@@ -347,7 +347,7 @@ a 1
hello 1
drop table t1;
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)));
drop table t1;
CREATE TABLE t1 (
......
......@@ -3436,7 +3436,7 @@ static void update_depend_map(JOIN *join)
uint i;
for (i=0 ; i < ref->key_parts ; i++,item++)
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;
for (JOIN_TAB **tab=join->map2table;
depend_map ;
......
......@@ -14,6 +14,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Implemention of my_strtoll(): Converting a string to a 64 bit integer.
# For documentation, check my_strtoll.c
.file "my_strtoll10-x86.s"
.version "01.01"
......@@ -62,7 +63,6 @@ my_strtoll10:
movl 8(%ebp),%esi # esi= nptr
movl 16(%ebp),%ecx # ecx= error (Will be overwritten later)
movl 12(%ebp),%eax # eax= endptr
cld # Move forward in esi
cmpl $0,%eax # if (endptr)
je .L110
......@@ -72,7 +72,8 @@ my_strtoll10:
.L100:
cmpl %ebx,%esi
je .Lno_conv
lodsb # al= next byte
movb (%esi), %al # al= next byte
incl %esi
cmpb $32,%al # Skip space
je .L100
cmpb $9,%al # Skip tab
......@@ -86,7 +87,8 @@ my_strtoll10:
movl %edi,12(%ebp) # endptr= &dummy, for easier end check
.p2align 4,,7
.L120:
lodsb # al= next byte
movb (%esi), %al # al= next byte
incl %esi
cmpb $32,%al
je .L120
cmpb $9,%al
......@@ -120,21 +122,23 @@ my_strtoll10:
.L460:
cmpl %ebx,%esi # Check if overflow
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
.L462:
cmpb $48,%al
jne .L475 # Number doesn't start with 0
movl %esi, %edi
decl %esi
.p2align 4,,7
.L481: # Skip pre zeros
# Skip pre zeros
.L481:
incl %esi # Skip processed byte
cmpl %ebx,%esi
je .Lms_return_zero
scasb
cmpb (%esi),%al # Test if next byte is also zero
je .L481
movl %edi, %esi
decl %esi # Point to last non '0' digit
leal 9(%esi),%ecx # ecx = end-of-current-part
xorl %edi,%edi # Store first 9 digits in edi
jmp .L482
......@@ -158,7 +162,8 @@ my_strtoll10:
.p2align 4,,7
.L488:
lodsb # al= next byte
movb (%esi), %al # al= next byte
incl %esi
addb $-48,%al
cmpb $9,%al
ja .Lend_i_dec_esi
......@@ -187,7 +192,8 @@ my_strtoll10:
.p2align 4,,7
.L498:
lodsb # al= next byte
movb (%esi), %al # al= next byte
incl %esi
addb $-48,%al
cmpb $9,%al
ja .Lend_i_and_j_decl_esi
......@@ -299,7 +305,7 @@ my_strtoll10:
cmpl $0,-20(%ebp)
je .Lreturn_save_endptr # Positive number
negl %eax
cltd # Negetive result in edx:eax
cltd # Neg result in edx:eax
jmp .Lreturn_save_endptr
# 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
SYNOPSYS
str2ull10(char *nptr, char **enptr, *long error)
my_strtoll10()
nptr in pointer to the string to be converted
endptr in/out pointer to the end of the string/
pointer to the stop character
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment