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
2011d717
Commit
2011d717
authored
Mar 16, 2004
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.233
parents
ac8c1cc4
ceaac59c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
16 deletions
+15
-16
sql/field.cc
sql/field.cc
+2
-2
sql/field_conv.cc
sql/field_conv.cc
+4
-4
sql/item.cc
sql/item.cc
+6
-7
sql/opt_range.cc
sql/opt_range.cc
+1
-1
sql/sql_base.cc
sql/sql_base.cc
+2
-2
No files found.
sql/field.cc
View file @
2011d717
...
...
@@ -5081,7 +5081,7 @@ int Field_geom::store(const char *from, uint length, CHARSET_INFO *cs)
wkb_type
=
uint4korr
(
from
+
WKB_HEADER_SIZE
);
if
(
wkb_type
<
(
uint32
)
Geometry
::
wkb_point
||
wkb_type
>
(
uint32
)
Geometry
::
wkb_end
)
return
1
;
return
-
1
;
Field_blob
::
store_length
(
length
);
if
(
table
->
copy_blobs
||
length
<=
MAX_FIELD_WIDTH
)
{
// Must make a copy
...
...
@@ -5094,7 +5094,7 @@ int Field_geom::store(const char *from, uint length, CHARSET_INFO *cs)
err:
bzero
(
ptr
,
Field_blob
::
pack_length
());
return
1
;
return
-
1
;
}
#endif
/*HAVE_SPATIAL*/
...
...
sql/field_conv.cc
View file @
2011d717
...
...
@@ -127,7 +127,7 @@ set_field_to_null(Field *field)
if
(
!
current_thd
->
no_errors
)
my_printf_error
(
ER_BAD_NULL_ERROR
,
ER
(
ER_BAD_NULL_ERROR
),
MYF
(
0
),
field
->
field_name
);
return
1
;
return
-
1
;
}
...
...
@@ -145,7 +145,7 @@ set_field_to_null(Field *field)
RETURN VALUES
0 Field could take 0 or an automatic conversion was used
1 Field could not take NULL and no conversion was used.
-
1 Field could not take NULL and no conversion was used.
If no_conversion was not set, an error message is printed
*/
...
...
@@ -159,7 +159,7 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions)
return
0
;
}
if
(
no_conversions
)
return
1
;
return
-
1
;
/*
Check if this is a special type, which will get a special walue
...
...
@@ -184,7 +184,7 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions)
if
(
!
current_thd
->
no_errors
)
my_printf_error
(
ER_BAD_NULL_ERROR
,
ER
(
ER_BAD_NULL_ERROR
),
MYF
(
0
),
field
->
field_name
);
return
1
;
return
-
1
;
}
...
...
sql/item.cc
View file @
2011d717
...
...
@@ -639,7 +639,7 @@ int Item_param::save_in_field(Field *field, bool no_conversions)
return
0
;
}
String
*
result
=
val_str
(
&
str_value
);
return
(
field
->
store
(
result
->
ptr
(),
result
->
length
(),
field
->
charset
()))
?
-
1
:
0
;
return
field
->
store
(
result
->
ptr
(),
result
->
length
(),
field
->
charset
())
;
}
bool
Item_param
::
get_time
(
TIME
*
res
)
...
...
@@ -1244,7 +1244,7 @@ int Item::save_in_field(Field *field, bool no_conversions)
field
->
set_notnull
();
error
=
field
->
store
(
nr
);
}
return
(
error
)
?
-
1
:
0
;
return
error
;
}
...
...
@@ -1255,8 +1255,7 @@ int Item_string::save_in_field(Field *field, bool no_conversions)
if
(
null_value
)
return
set_field_to_null
(
field
);
field
->
set_notnull
();
return
(
field
->
store
(
result
->
ptr
(),
result
->
length
(),
collation
.
collation
))
?
-
1
:
0
;
return
field
->
store
(
result
->
ptr
(),
result
->
length
(),
collation
.
collation
);
}
int
Item_uint
::
save_in_field
(
Field
*
field
,
bool
no_conversions
)
...
...
@@ -1275,7 +1274,7 @@ int Item_int::save_in_field(Field *field, bool no_conversions)
if
(
null_value
)
return
set_field_to_null
(
field
);
field
->
set_notnull
();
return
(
field
->
store
(
nr
))
?
-
1
:
0
;
return
field
->
store
(
nr
)
;
}
...
...
@@ -1285,7 +1284,7 @@ int Item_real::save_in_field(Field *field, bool no_conversions)
if
(
null_value
)
return
set_field_to_null
(
field
);
field
->
set_notnull
();
return
(
field
->
store
(
nr
))
?
-
1
:
0
;
return
field
->
store
(
nr
)
;
}
/****************************************************************************
...
...
@@ -1347,7 +1346,7 @@ int Item_varbinary::save_in_field(Field *field, bool no_conversions)
longlong
nr
=
val_int
();
error
=
field
->
store
(
nr
);
}
return
(
error
)
?
-
1
:
0
;
return
error
;
}
...
...
sql/opt_range.cc
View file @
2011d717
...
...
@@ -1095,7 +1095,7 @@ get_mm_leaf(PARAM *param, COND *conf_func, Field *field, KEY_PART *key_part,
field
->
cmp_type
()
!=
value
->
result_type
())
DBUG_RETURN
(
0
);
if
(
value
->
save_in_field
(
field
,
1
)
>
0
)
if
(
value
->
save_in_field
(
field
,
1
)
<
0
)
{
/* This happens when we try to insert a NULL field in a not null column */
DBUG_RETURN
(
&
null_element
);
// cmp with NULL is never true
...
...
sql/sql_base.cc
View file @
2011d717
...
...
@@ -2423,7 +2423,7 @@ fill_record(List<Item> &fields,List<Item> &values, bool ignore_errors)
TABLE
*
table
=
rfield
->
table
;
if
(
rfield
==
table
->
next_number_field
)
table
->
auto_increment_field_not_null
=
true
;
if
(
value
->
save_in_field
(
rfield
,
0
)
>
0
&&
!
ignore_errors
)
if
(
(
value
->
save_in_field
(
rfield
,
0
)
<
0
)
&&
!
ignore_errors
)
DBUG_RETURN
(
1
);
}
DBUG_RETURN
(
0
);
...
...
@@ -2444,7 +2444,7 @@ fill_record(Field **ptr,List<Item> &values, bool ignore_errors)
TABLE
*
table
=
field
->
table
;
if
(
field
==
table
->
next_number_field
)
table
->
auto_increment_field_not_null
=
true
;
if
(
value
->
save_in_field
(
field
,
0
)
==
1
&&
!
ignore_errors
)
if
(
(
value
->
save_in_field
(
field
,
0
)
<
0
)
&&
!
ignore_errors
)
DBUG_RETURN
(
1
);
}
DBUG_RETURN
(
0
);
...
...
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