Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
068bd3eb
Commit
068bd3eb
authored
Jun 07, 2005
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After merge fixes
parent
775f1766
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
56 deletions
+51
-56
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+12
-6
mysql-test/r/warnings.result
mysql-test/r/warnings.result
+24
-24
sql/item.cc
sql/item.cc
+1
-2
sql/item_func.cc
sql/item_func.cc
+1
-1
sql/item_sum.cc
sql/item_sum.cc
+9
-17
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+3
-5
No files found.
mysql-test/r/innodb.result
View file @
068bd3eb
...
...
@@ -1450,16 +1450,22 @@ test.t3 NULL
test.t4 NULL
Warnings:
Error 1146 Table 'test.t4' doesn't exist
checksum table t1, t2, t3;
checksum table t1, t2, t3
, t4
;
Table Checksum
test.t1 2948697075
test.t2 1157260244
test.t3 1157260244
checksum table t1, t2, t3 extended;
test.t4 NULL
Warnings:
Error 1146 Table 'test.t4' doesn't exist
checksum table t1, t2, t3, t4 extended;
Table Checksum
test.t1 3092701434
test.t2 1157260244
test.t3 1157260244
test.t4 NULL
Warnings:
Error 1146 Table 'test.t4' doesn't exist
drop table t1,t2,t3;
create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=innodb;
insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt');
...
...
@@ -1632,14 +1638,14 @@ t2 CREATE TABLE `t2` (
drop table t2, t1;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 15
4
Binlog_cache_use 15
3
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 0
create table t1 (a int) engine=innodb;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 15
5
Binlog_cache_use 15
4
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
...
...
@@ -1648,7 +1654,7 @@ delete from t1;
commit;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 15
6
Binlog_cache_use 15
5
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
...
...
@@ -1738,7 +1744,7 @@ Variable_name Value
Innodb_rows_deleted 2070
show status like "Innodb_rows_inserted";
Variable_name Value
Innodb_rows_inserted 317
09
Innodb_rows_inserted 317
18
show status like "Innodb_rows_updated";
Variable_name Value
Innodb_rows_updated 29530
...
...
mysql-test/r/warnings.result
View file @
068bd3eb
...
...
@@ -185,44 +185,44 @@ create table t1 (a int);
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
update t1 set a='abc';
Warnings:
Warning 126
5 Data trunca
ted for column 'a' at row 1
Warning 126
5 Data trunca
ted for column 'a' at row 2
Warning 126
5 Data trunca
ted for column 'a' at row 3
Warning 126
5 Data trunca
ted for column 'a' at row 4
Warning 126
5 Data trunca
ted for column 'a' at row 5
Warning 126
5 Data trunca
ted for column 'a' at row 6
Warning 126
5 Data trunca
ted for column 'a' at row 7
Warning 126
5 Data trunca
ted for column 'a' at row 8
Warning 126
5 Data trunca
ted for column 'a' at row 9
Warning 126
5 Data trunca
ted for column 'a' at row 10
Warning 126
4 Out of range value adjus
ted for column 'a' at row 1
Warning 126
4 Out of range value adjus
ted for column 'a' at row 2
Warning 126
4 Out of range value adjus
ted for column 'a' at row 3
Warning 126
4 Out of range value adjus
ted for column 'a' at row 4
Warning 126
4 Out of range value adjus
ted for column 'a' at row 5
Warning 126
4 Out of range value adjus
ted for column 'a' at row 6
Warning 126
4 Out of range value adjus
ted for column 'a' at row 7
Warning 126
4 Out of range value adjus
ted for column 'a' at row 8
Warning 126
4 Out of range value adjus
ted for column 'a' at row 9
Warning 126
4 Out of range value adjus
ted for column 'a' at row 10
show warnings limit 2, 1;
Level Code Message
Warning 126
5 Data trunca
ted for column 'a' at row 3
Warning 126
4 Out of range value adjus
ted for column 'a' at row 3
show warnings limit 0, 10;
Level Code Message
Warning 126
5 Data trunca
ted for column 'a' at row 1
Warning 126
5 Data trunca
ted for column 'a' at row 2
Warning 126
5 Data trunca
ted for column 'a' at row 3
Warning 126
5 Data trunca
ted for column 'a' at row 4
Warning 126
5 Data trunca
ted for column 'a' at row 5
Warning 126
5 Data trunca
ted for column 'a' at row 6
Warning 126
5 Data trunca
ted for column 'a' at row 7
Warning 126
5 Data trunca
ted for column 'a' at row 8
Warning 126
5 Data trunca
ted for column 'a' at row 9
Warning 126
5 Data trunca
ted for column 'a' at row 10
Warning 126
4 Out of range value adjus
ted for column 'a' at row 1
Warning 126
4 Out of range value adjus
ted for column 'a' at row 2
Warning 126
4 Out of range value adjus
ted for column 'a' at row 3
Warning 126
4 Out of range value adjus
ted for column 'a' at row 4
Warning 126
4 Out of range value adjus
ted for column 'a' at row 5
Warning 126
4 Out of range value adjus
ted for column 'a' at row 6
Warning 126
4 Out of range value adjus
ted for column 'a' at row 7
Warning 126
4 Out of range value adjus
ted for column 'a' at row 8
Warning 126
4 Out of range value adjus
ted for column 'a' at row 9
Warning 126
4 Out of range value adjus
ted for column 'a' at row 10
show warnings limit 9, 1;
Level Code Message
Warning 126
5 Data trunca
ted for column 'a' at row 10
Warning 126
4 Out of range value adjus
ted for column 'a' at row 10
show warnings limit 10, 1;
Level Code Message
show warnings limit 9, 2;
Level Code Message
Warning 126
5 Data trunca
ted for column 'a' at row 10
Warning 126
4 Out of range value adjus
ted for column 'a' at row 10
show warnings limit 0, 0;
Level Code Message
show warnings limit 1;
Level Code Message
Warning 126
5 Data trunca
ted for column 'a' at row 1
Warning 126
4 Out of range value adjus
ted for column 'a' at row 1
show warnings limit 0;
Level Code Message
show warnings limit 1, 0;
...
...
sql/item.cc
View file @
068bd3eb
...
...
@@ -4414,8 +4414,7 @@ bool Item_direct_ref::val_bool()
bool
Item_direct_ref
::
is_null
()
{
(
void
)
(
*
ref
)
->
val_int
();
return
(
*
ref
)
->
null_value
;
return
(
*
ref
)
->
is_null
();
}
...
...
sql/item_func.cc
View file @
068bd3eb
...
...
@@ -2395,7 +2395,7 @@ longlong Item_func_field::val_int()
return
0
;
for
(
uint
i
=
1
;
i
<
arg_count
;
i
++
)
{
if
(
val
==
args
[
i
]
->
val
()
&&
!
args
[
i
]
->
null_value
)
if
(
val
==
args
[
i
]
->
val
_real
()
&&
!
args
[
i
]
->
null_value
)
return
(
longlong
)
(
i
);
}
}
...
...
sql/item_sum.cc
View file @
068bd3eb
...
...
@@ -2615,7 +2615,6 @@ int group_concat_key_cmp_with_distinct(void* arg, byte* key1,
Item_func_group_concat
*
grp_item
=
(
Item_func_group_concat
*
)
arg
;
TABLE
*
table
=
grp_item
->
table
;
Item
**
field_item
,
**
end
;
char
*
record
=
(
char
*
)
table
->
record
[
0
]
+
table
->
s
->
null_bytes
;
for
(
field_item
=
grp_item
->
args
,
end
=
field_item
+
grp_item
->
arg_count_field
;
field_item
<
end
;
...
...
@@ -2630,7 +2629,7 @@ int group_concat_key_cmp_with_distinct(void* arg, byte* key1,
if
(
field
)
{
int
res
;
uint
offset
=
(
uint
)
(
field
->
ptr
-
record
)
;
uint
offset
=
field
->
offset
()
-
table
->
s
->
null_bytes
;
if
((
res
=
field
->
cmp
((
char
*
)
key1
+
offset
,
(
char
*
)
key2
+
offset
)))
return
res
;
}
...
...
@@ -2649,7 +2648,6 @@ int group_concat_key_cmp_with_order(void* arg, byte* key1, byte* key2)
Item_func_group_concat
*
grp_item
=
(
Item_func_group_concat
*
)
arg
;
ORDER
**
order_item
,
**
end
;
TABLE
*
table
=
grp_item
->
table
;
char
*
record
=
(
char
*
)
table
->
record
[
0
]
+
table
->
s
->
null_bytes
;
for
(
order_item
=
grp_item
->
order
,
end
=
order_item
+
grp_item
->
arg_count_order
;
order_item
<
end
;
...
...
@@ -2666,7 +2664,7 @@ int group_concat_key_cmp_with_order(void* arg, byte* key1, byte* key2)
if
(
field
)
{
int
res
;
uint
offset
=
(
uint
)
(
field
->
ptr
-
record
)
;
uint
offset
=
field
->
offset
()
-
table
->
s
->
null_bytes
;
if
((
res
=
field
->
cmp
((
char
*
)
key1
+
offset
,
(
char
*
)
key2
+
offset
)))
return
(
*
order_item
)
->
asc
?
res
:
-
res
;
}
...
...
@@ -2707,8 +2705,9 @@ int dump_leaf_key(byte* key, element_count count __attribute__((unused)),
Item_func_group_concat
*
item
)
{
TABLE
*
table
=
item
->
table
;
char
*
record
=
(
char
*
)
table
->
record
[
0
]
+
table
->
s
->
null_bytes
;
String
tmp
((
char
*
)
table
->
record
[
1
],
table
->
s
->
reclength
,
default_charset_info
),
tmp2
;
String
tmp
((
char
*
)
table
->
record
[
1
],
table
->
s
->
reclength
,
default_charset_info
);
String
tmp2
;
String
*
result
=
&
item
->
result
;
Item
**
arg
=
item
->
args
,
**
arg_end
=
item
->
args
+
item
->
arg_count_field
;
...
...
@@ -2730,12 +2729,9 @@ int dump_leaf_key(byte* key, element_count count __attribute__((unused)),
because it contains both order and arg list fields.
*/
Field
*
field
=
(
*
arg
)
->
get_tmp_table_field
();
char
*
save_ptr
=
field
->
ptr
;
uint
offset
=
(
uint
)
(
save_ptr
-
record
);
uint
offset
=
field
->
offset
()
-
table
->
s
->
null_bytes
;
DBUG_ASSERT
(
offset
<
table
->
s
->
reclength
);
field
->
ptr
=
(
char
*
)
key
+
offset
;
res
=
field
->
val_str
(
&
tmp
,
&
tmp2
);
field
->
ptr
=
save_ptr
;
res
=
field
->
val_str
(
&
tmp
,
(
char
*
)
key
+
offset
);
}
else
res
=
(
*
arg
)
->
val_str
(
&
tmp
);
...
...
@@ -2917,12 +2913,8 @@ bool Item_func_group_concat::add()
Item
*
show_item
=
args
[
i
];
if
(
!
show_item
->
const_item
())
{
/*
Here we use real_item as we want the original field data that should
be written to table->record[0]
*/
Field
*
f
=
show_item
->
real_item
()
->
get_tmp_table_field
();
if
(
f
->
is_null
())
Field
*
f
=
show_item
->
get_tmp_table_field
();
if
(
f
->
is_null_in_record
((
const
uchar
*
)
table
->
record
[
0
]))
return
0
;
// Skip row if it contains null
}
}
...
...
sql/sql_parse.cc
View file @
068bd3eb
...
...
@@ -5028,7 +5028,7 @@ bool check_stack_overrun(THD *thd, long margin,
{
long
stack_used
;
if
((
stack_used
=
used_stack
(
thd
->
thread_stack
,(
char
*
)
&
stack_used
))
>=
thread_stack
-
margin
)
(
long
)
(
thread_stack
-
margin
)
)
{
sprintf
(
errbuff
[
0
],
ER
(
ER_STACK_OVERRUN
),
stack_used
,
thread_stack
);
my_message
(
ER_STACK_OVERRUN
,
errbuff
[
0
],
MYF
(
0
));
...
...
sql/sql_select.cc
View file @
068bd3eb
...
...
@@ -13089,16 +13089,14 @@ bool JOIN::rollup_make_fields(List<Item> &fields_arg, List<Item> &sel_fields,
{
if
(
item
->
eq
(
*
group_tmp
->
item
,
0
))
{
Item_null_result
*
null_item
;
/*
This is an element that is used by the GROUP BY and should be
set to NULL in this level
*/
Item_null_result
*
null_item
;
Item_null_result
*
null_item
=
new
(
thd
->
mem_root
)
Item_null_result
();
if
(
!
null_item
)
return
1
;
item
->
maybe_null
=
1
;
// Value will be null sometimes
null_item
=
rollup
.
null_items
[
i
];
DBUG_ASSERT
(
null_item
->
result_field
==
0
||
null_item
->
result_field
==
item
->
get_tmp_table_field
());
null_item
->
result_field
=
item
->
get_tmp_table_field
();
item
=
null_item
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment