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
4a5ca394
Commit
4a5ca394
authored
Jun 10, 2003
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
parents
287ea057
22a7449c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
mysql-test/r/type_blob.result
mysql-test/r/type_blob.result
+11
-0
mysql-test/t/type_blob.test
mysql-test/t/type_blob.test
+7
-0
sql/item_strfunc.h
sql/item_strfunc.h
+2
-2
No files found.
mysql-test/r/type_blob.result
View file @
4a5ca394
...
@@ -486,8 +486,19 @@ fish 10
...
@@ -486,8 +486,19 @@ fish 10
drop table t1;
drop table t1;
create table t1 (id integer auto_increment unique,imagem LONGBLOB not null);
create table t1 (id integer auto_increment unique,imagem LONGBLOB not null);
insert into t1 (id) values (1);
insert into t1 (id) values (1);
select
charset(load_file('../../std_data/words.dat')),
collation(load_file('../../std_data/words.dat')),
coercibility(load_file('../../std_data/words.dat'));
charset(load_file('../../std_data/words.dat')) collation(load_file('../../std_data/words.dat')) coercibility(load_file('../../std_data/words.dat'))
binary binary 3
update t1 set imagem=load_file('../../std_data/words.dat') where id=1;
update t1 set imagem=load_file('../../std_data/words.dat') where id=1;
select if(imagem is null, "ERROR", "OK"),length(imagem) from t1 where id = 1;
select if(imagem is null, "ERROR", "OK"),length(imagem) from t1 where id = 1;
if(imagem is null, "ERROR", "OK") length(imagem)
if(imagem is null, "ERROR", "OK") length(imagem)
OK 581
OK 581
drop table t1;
drop table t1;
create table t1 select load_file('../../std_data/words.dat');
show full fields from t1;
Field Type Collation Null Key Default Extra Privileges Comment
load_file('../../std_data/words.dat') mediumblob NULL YES NULL select,insert,update,references
drop table t1;
mysql-test/t/type_blob.test
View file @
4a5ca394
...
@@ -294,6 +294,13 @@ drop table t1;
...
@@ -294,6 +294,13 @@ drop table t1;
create
table
t1
(
id
integer
auto_increment
unique
,
imagem
LONGBLOB
not
null
);
create
table
t1
(
id
integer
auto_increment
unique
,
imagem
LONGBLOB
not
null
);
insert
into
t1
(
id
)
values
(
1
);
insert
into
t1
(
id
)
values
(
1
);
select
charset
(
load_file
(
'../../std_data/words.dat'
)),
collation
(
load_file
(
'../../std_data/words.dat'
)),
coercibility
(
load_file
(
'../../std_data/words.dat'
));
update
t1
set
imagem
=
load_file
(
'../../std_data/words.dat'
)
where
id
=
1
;
update
t1
set
imagem
=
load_file
(
'../../std_data/words.dat'
)
where
id
=
1
;
select
if
(
imagem
is
null
,
"ERROR"
,
"OK"
),
length
(
imagem
)
from
t1
where
id
=
1
;
select
if
(
imagem
is
null
,
"ERROR"
,
"OK"
),
length
(
imagem
)
from
t1
where
id
=
1
;
drop
table
t1
;
drop
table
t1
;
create
table
t1
select
load_file
(
'../../std_data/words.dat'
);
show
full
fields
from
t1
;
drop
table
t1
;
sql/item_strfunc.h
View file @
4a5ca394
...
@@ -536,8 +536,8 @@ public:
...
@@ -536,8 +536,8 @@ public:
const
char
*
func_name
()
const
{
return
"load_file"
;
}
const
char
*
func_name
()
const
{
return
"load_file"
;
}
void
fix_length_and_dec
()
void
fix_length_and_dec
()
{
{
set_charset
(
&
my_charset_bin
);
set_charset
(
&
my_charset_bin
,
COER_COERCIBLE
);
maybe_null
=
1
;
maybe_null
=
1
;
max_length
=
MAX_BLOB_WIDTH
;
max_length
=
MAX_BLOB_WIDTH
;
}
}
};
};
...
...
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