Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0

into sinisa.nasamreza.org:/mnt/work/mysql-4.0
This commit is contained in:
Sinisa@sinisa.nasamreza.org 2004-01-12 16:28:12 +02:00
commit 05237bd863
4 changed files with 17 additions and 3 deletions

View file

@ -1389,7 +1389,7 @@ static int dump_all_tables_in_db(char *database)
if (opt_xml)
fprintf(md_result_file, "</database>\n");
if (lock_tables)
mysql_query(sock,"UNLOCK_TABLES");
mysql_query(sock,"UNLOCK TABLES");
return 0;
} /* dump_all_tables_in_db */
@ -1435,7 +1435,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
if (opt_xml)
fprintf(md_result_file, "</database>\n");
if (lock_tables)
mysql_query(sock,"UNLOCK_TABLES");
mysql_query(sock,"UNLOCK TABLES");
return 0;
} /* dump_selected_tables */

View file

@ -601,3 +601,9 @@ id txt
2 Chevy
4 Ford
drop table t1;
CREATE TABLE t1 ( i int(11) NOT NULL default '0', c text NOT NULL, PRIMARY KEY (i), KEY (c(1),c(1)));
INSERT t1 VALUES (1,''),(2,''),(3,'asdfh'),(4,'');
select max(i) from t1 where c = '';
max(i)
4
drop table t1;

View file

@ -312,3 +312,9 @@ select * from t1 where txt <= 'Chevy';
select * from t1 where txt > 'Chevy';
select * from t1 where txt >= 'Chevy';
drop table t1;
CREATE TABLE t1 ( i int(11) NOT NULL default '0', c text NOT NULL, PRIMARY KEY (i), KEY (c(1),c(1)));
INSERT t1 VALUES (1,''),(2,''),(3,'asdfh'),(4,'');
select max(i) from t1 where c = '';
drop table t1;

View file

@ -443,7 +443,9 @@ static bool find_range_key(TABLE_REF *ref, Field* field, COND *cond)
// Save found constant
if (part->null_bit)
*key_ptr++= (byte) test(part->field->is_null());
part->field->get_key_image((char*) key_ptr,part->length);
part->field->get_key_image((char*) key_ptr,
(part->field->type() == FIELD_TYPE_BLOB) ?
part->length + HA_KEY_BLOB_LENGTH : part->length);
key_ptr+=part->store_length - test(part->null_bit);
left_length-=part->store_length;
}