Commit 7e50f032 authored by unknown's avatar unknown

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

into sinisa.nasamreza.org:/mnt/work/mysql-4.0

parents 9d8bf698 e2ab8558
......@@ -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 */
......
......@@ -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;
......@@ -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;
......@@ -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;
}
......
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