mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixes for compilation errors in Windows (casts from uint32* to uint*) in repl and charset code.
Moving the part of user_var.test using UCS2 to ctype_ucs.test mysql-test/r/ctype_ucs.result: result update mysql-test/r/user_var.result: result update mysql-test/t/ctype_ucs.test: importing test piece from user_var.test mysql-test/t/user_var.test: using UCS2 in this test fails on non-USC2-capable binaries, so let's move this piece to ctype_ucs.test. sql/slave.cc: changing arg type to uint32* (as what is used in this arg is &thd->db_length which is uint32*) sql/slave.h: changing arg type to uint32* sql/sql_parse.cc: changing arg types to uint32, as what is used in these args is a create_field::length which is uint32.
This commit is contained in:
@ -4123,7 +4123,7 @@ bool mysql_test_parse_for_slave(THD *thd, char *inBuf, uint length)
|
||||
- SET uses tot_length.
|
||||
*/
|
||||
void calculate_interval_lengths(THD *thd, TYPELIB *interval,
|
||||
uint *max_length, uint *tot_length)
|
||||
uint32 *max_length, uint32 *tot_length)
|
||||
{
|
||||
const char **pos;
|
||||
uint *len;
|
||||
@ -4135,7 +4135,7 @@ void calculate_interval_lengths(THD *thd, TYPELIB *interval,
|
||||
*len= (uint) strip_sp((char*) *pos);
|
||||
uint length= cs->cset->numchars(cs, *pos, *pos + *len);
|
||||
*tot_length+= length;
|
||||
set_if_bigger(*max_length, length);
|
||||
set_if_bigger(*max_length, (uint32)length);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4454,7 +4454,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
|
||||
if (new_field->pack_length > 4)
|
||||
new_field->pack_length=8;
|
||||
new_field->interval=interval;
|
||||
uint dummy_max_length;
|
||||
uint32 dummy_max_length;
|
||||
calculate_interval_lengths(thd, interval,
|
||||
&dummy_max_length, &new_field->length);
|
||||
new_field->length+= (interval->count - 1);
|
||||
@ -4484,7 +4484,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
|
||||
new_field->interval=interval;
|
||||
new_field->pack_length=interval->count < 256 ? 1 : 2; // Should be safe
|
||||
|
||||
uint dummy_tot_length;
|
||||
uint32 dummy_tot_length;
|
||||
calculate_interval_lengths(thd, interval,
|
||||
&new_field->length, &dummy_tot_length);
|
||||
set_if_smaller(new_field->length,MAX_FIELD_WIDTH-1);
|
||||
|
Reference in New Issue
Block a user