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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
dc0645f7
Commit
dc0645f7
authored
Jul 20, 2005
by
georg@lmy002.wdf.sap.corp
Browse files
Options
Browse Files
Download
Plain Diff
Merge grichter@bk-internal.mysql.com:/home/bk/mysql-4.1
into lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-4.1
parents
0f7639ba
3468c848
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
4 deletions
+49
-4
include/mysql.h
include/mysql.h
+1
-1
libmysql/libmysql.c
libmysql/libmysql.c
+3
-2
sql-common/client.c
sql-common/client.c
+1
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+44
-0
No files found.
include/mysql.h
View file @
dc0645f7
...
@@ -381,7 +381,7 @@ unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
...
@@ -381,7 +381,7 @@ unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
const
char
*
STDCALL
mysql_info
(
MYSQL
*
mysql
);
const
char
*
STDCALL
mysql_info
(
MYSQL
*
mysql
);
unsigned
long
STDCALL
mysql_thread_id
(
MYSQL
*
mysql
);
unsigned
long
STDCALL
mysql_thread_id
(
MYSQL
*
mysql
);
const
char
*
STDCALL
mysql_character_set_name
(
MYSQL
*
mysql
);
const
char
*
STDCALL
mysql_character_set_name
(
MYSQL
*
mysql
);
int
STDCALL
mysql_set_character_set
(
MYSQL
*
mysql
,
char
*
csname
);
int
STDCALL
mysql_set_character_set
(
MYSQL
*
mysql
,
const
char
*
csname
);
MYSQL
*
STDCALL
mysql_init
(
MYSQL
*
mysql
);
MYSQL
*
STDCALL
mysql_init
(
MYSQL
*
mysql
);
my_bool
STDCALL
mysql_ssl_set
(
MYSQL
*
mysql
,
const
char
*
key
,
my_bool
STDCALL
mysql_ssl_set
(
MYSQL
*
mysql
,
const
char
*
key
,
...
...
libmysql/libmysql.c
View file @
dc0645f7
...
@@ -1510,7 +1510,7 @@ const char * STDCALL mysql_character_set_name(MYSQL *mysql)
...
@@ -1510,7 +1510,7 @@ const char * STDCALL mysql_character_set_name(MYSQL *mysql)
}
}
int
STDCALL
mysql_set_character_set
(
MYSQL
*
mysql
,
char
*
cs_name
)
int
STDCALL
mysql_set_character_set
(
MYSQL
*
mysql
,
c
onst
c
har
*
cs_name
)
{
{
struct
charset_info_st
*
cs
;
struct
charset_info_st
*
cs
;
const
char
*
save_csdir
=
charsets_dir
;
const
char
*
save_csdir
=
charsets_dir
;
...
@@ -1518,7 +1518,8 @@ int STDCALL mysql_set_character_set(MYSQL *mysql, char *cs_name)
...
@@ -1518,7 +1518,8 @@ int STDCALL mysql_set_character_set(MYSQL *mysql, char *cs_name)
if
(
mysql
->
options
.
charset_dir
)
if
(
mysql
->
options
.
charset_dir
)
charsets_dir
=
mysql
->
options
.
charset_dir
;
charsets_dir
=
mysql
->
options
.
charset_dir
;
if
((
cs
=
get_charset_by_csname
(
cs_name
,
MY_CS_PRIMARY
,
MYF
(
0
))))
if
(
strlen
(
cs_name
)
<
MY_CS_NAME_SIZE
&&
(
cs
=
get_charset_by_csname
(
cs_name
,
MY_CS_PRIMARY
,
MYF
(
0
))))
{
{
char
buff
[
MY_CS_NAME_SIZE
+
10
];
char
buff
[
MY_CS_NAME_SIZE
+
10
];
charsets_dir
=
save_csdir
;
charsets_dir
=
save_csdir
;
...
...
sql-common/client.c
View file @
dc0645f7
...
@@ -755,7 +755,7 @@ static void cli_flush_use_result(MYSQL *mysql)
...
@@ -755,7 +755,7 @@ static void cli_flush_use_result(MYSQL *mysql)
{
{
if
(
protocol_41
(
mysql
))
if
(
protocol_41
(
mysql
))
{
{
char
*
pos
=
(
char
*
)
mysql
->
net
.
read_pos
;
char
*
pos
=
(
char
*
)
mysql
->
net
.
read_pos
+
1
;
mysql
->
warning_count
=
uint2korr
(
pos
);
pos
+=
2
;
mysql
->
warning_count
=
uint2korr
(
pos
);
pos
+=
2
;
mysql
->
server_status
=
uint2korr
(
pos
);
pos
+=
2
;
mysql
->
server_status
=
uint2korr
(
pos
);
pos
+=
2
;
}
}
...
...
tests/mysql_client_test.c
View file @
dc0645f7
...
@@ -11751,6 +11751,49 @@ static void test_bug11183()
...
@@ -11751,6 +11751,49 @@ static void test_bug11183()
myquery
(
rc
);
myquery
(
rc
);
}
}
static
void
test_bug12001
()
{
MYSQL
*
mysql_local
;
MYSQL_RES
*
result
;
const
char
*
query
=
"DROP TABLE IF EXISTS test_table;"
"CREATE TABLE test_table(id INT);"
"INSERT INTO test_table VALUES(10);"
"UPDATE test_table SET id=20 WHERE id=10;"
"SELECT * FROM test_table;"
"INSERT INTO non_existent_table VALUES(11);"
;
int
rc
,
res
;
myheader
(
"test_bug12001"
);
if
(
!
(
mysql_local
=
mysql_init
(
NULL
)))
{
fprintf
(
stdout
,
"
\n
mysql_init() failed"
);
exit
(
1
);
}
/* Create connection that supports multi statements */
if
(
!
mysql_real_connect
(
mysql_local
,
opt_host
,
opt_user
,
opt_password
,
current_db
,
opt_port
,
opt_unix_socket
,
CLIENT_MULTI_STATEMENTS
|
CLIENT_MULTI_RESULTS
))
{
fprintf
(
stdout
,
"
\n
mysql_real_connect() failed"
);
exit
(
1
);
}
rc
=
mysql_query
(
mysql_local
,
query
);
myquery
(
rc
);
do
{
if
(
mysql_field_count
(
mysql_local
)
&&
(
result
=
mysql_use_result
(
mysql_local
)))
{
mysql_free_result
(
result
);
}
}
while
(
!
(
res
=
mysql_next_result
(
mysql_local
)));
rc
=
mysql_query
(
mysql_local
,
"DROP TABLE IF EXISTS test_table"
);
myquery
(
rc
);
mysql_close
(
mysql_local
);
DIE_UNLESS
(
res
==
1
);
}
/*
/*
Read and parse arguments and MySQL options from my.cnf
Read and parse arguments and MySQL options from my.cnf
...
@@ -11968,6 +12011,7 @@ static struct my_tests_st my_tests[]= {
...
@@ -11968,6 +12011,7 @@ static struct my_tests_st my_tests[]= {
{
"test_bug8378"
,
test_bug8378
},
{
"test_bug8378"
,
test_bug8378
},
{
"test_bug9735"
,
test_bug9735
},
{
"test_bug9735"
,
test_bug9735
},
{
"test_bug11183"
,
test_bug11183
},
{
"test_bug11183"
,
test_bug11183
},
{
"test_bug12001"
,
test_bug12001
},
{
0
,
0
}
{
0
,
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