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
fec63062
Commit
fec63062
authored
Nov 18, 2004
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some comments regarding Bug#6275 ""client_test" fail in 4.1.7 make test"
parent
acc0317b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
tests/client_test.c
tests/client_test.c
+19
-3
No files found.
tests/client_test.c
View file @
fec63062
...
...
@@ -635,12 +635,15 @@ static void verify_prepare_field(MYSQL_RES *result,
unsigned
long
length
,
const
char
*
def
)
{
MYSQL_FIELD
*
field
;
CHARSET_INFO
*
cs
;
if
(
!
(
field
=
mysql_fetch_field_direct
(
result
,
no
)))
{
fprintf
(
stdout
,
"
\n
*** ERROR: FAILED TO GET THE RESULT ***"
);
exit
(
1
);
}
cs
=
get_charset
(
field
->
charsetnr
,
0
);
DIE_UNLESS
(
cs
);
if
(
!
opt_silent
)
{
fprintf
(
stdout
,
"
\n
field[%d]:"
,
no
);
...
...
@@ -654,7 +657,7 @@ static void verify_prepare_field(MYSQL_RES *result,
field
->
org_table
,
org_table
);
fprintf
(
stdout
,
"
\n
database :`%s`
\t
(expected: `%s`)"
,
field
->
db
,
db
);
fprintf
(
stdout
,
"
\n
length :`%ld`
\t
(expected: `%ld`)"
,
field
->
length
,
length
);
field
->
length
,
length
*
cs
->
mbmaxlen
);
fprintf
(
stdout
,
"
\n
maxlength:`%ld`"
,
field
->
max_length
);
fprintf
(
stdout
,
"
\n
charsetnr:`%d`"
,
field
->
charsetnr
);
fprintf
(
stdout
,
"
\n
default :`%s`
\t
(expected: `%s`)"
,
...
...
@@ -663,11 +666,24 @@ static void verify_prepare_field(MYSQL_RES *result,
}
DIE_UNLESS
(
strcmp
(
field
->
name
,
name
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
org_name
,
org_name
)
==
0
);
/*
XXX: silent column specification change works based on number of
bytes a column occupies. So CHAR -> VARCHAR upgrade is possible even
for CHAR(2) column if its character set is multibyte.
VARCHAR -> CHAR downgrade won't work for VARCHAR(3) as one would
expect.
*/
if
(
cs
->
mbmaxlen
==
1
)
DIE_UNLESS
(
field
->
type
==
type
);
DIE_UNLESS
(
strcmp
(
field
->
table
,
table
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
org_table
,
org_table
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
db
,
db
)
==
0
);
DIE_UNLESS
(
field
->
length
==
length
);
/*
Character set should be taken into account for multibyte encodings, such
as utf8. Field length is calculated as number of characters * maximum
number of bytes a character can occupy.
*/
DIE_UNLESS
(
field
->
length
==
length
*
cs
->
mbmaxlen
);
if
(
def
)
DIE_UNLESS
(
strcmp
(
field
->
def
,
def
)
==
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