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
afaa4e2b
Commit
afaa4e2b
authored
Apr 11, 2006
by
msvensson@shellback
Browse files
Options
Browse Files
Download
Plain Diff
Merge 192.168.0.10:mysql/mysql-5.1
into shellback.:C:/mysql/my51-bug17368
parents
196bcbf7
1927e39d
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
239 additions
and
15 deletions
+239
-15
cmakelists.txt
cmakelists.txt
+9
-0
libmysql/mytest.c
libmysql/mytest.c
+147
-0
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+0
-2
mysql-test/r/csv.result
mysql-test/r/csv.result
+30
-0
mysql-test/t/csv.test
mysql-test/t/csv.test
+22
-1
server-tools/instance-manager/guardian.cc
server-tools/instance-manager/guardian.cc
+0
-2
server-tools/instance-manager/mysql_connection.cc
server-tools/instance-manager/mysql_connection.cc
+1
-1
sql/ha_partition.cc
sql/ha_partition.cc
+1
-3
sql/sql_delete.cc
sql/sql_delete.cc
+0
-1
sql/sql_handler.cc
sql/sql_handler.cc
+0
-1
storage/csv/ha_tina.cc
storage/csv/ha_tina.cc
+24
-4
win/README
win/README
+5
-0
No files found.
cmakelists.txt
View file @
afaa4e2b
...
@@ -3,6 +3,9 @@ PROJECT(MySql)
...
@@ -3,6 +3,9 @@ PROJECT(MySql)
# This reads user configuration, generated by configure.js.
# This reads user configuration, generated by configure.js.
INCLUDE
(
win/configure.data
)
INCLUDE
(
win/configure.data
)
# Hardcode support for CSV storage engine
SET
(
WITH_CSV_STORAGE_ENGINE TRUE
)
CONFIGURE_FILE
(
${
CMAKE_SOURCE_DIR
}
/include/mysql_version.h.in
CONFIGURE_FILE
(
${
CMAKE_SOURCE_DIR
}
/include/mysql_version.h.in
${
CMAKE_SOURCE_DIR
}
/include/mysql_version.h @ONLY
)
${
CMAKE_SOURCE_DIR
}
/include/mysql_version.h @ONLY
)
...
@@ -18,6 +21,12 @@ IF(WITH_BLACKHOLE_STORAGE_ENGINE)
...
@@ -18,6 +21,12 @@ IF(WITH_BLACKHOLE_STORAGE_ENGINE)
SET
(
mysql_se_decls
"
${
mysql_se_decls
}
, blackhole_hton"
)
SET
(
mysql_se_decls
"
${
mysql_se_decls
}
, blackhole_hton"
)
SET
(
mysql_se_ha_src
${
mysql_se_ha_src
}
"../sql/ha_blackhole.cc"
)
SET
(
mysql_se_ha_src
${
mysql_se_ha_src
}
"../sql/ha_blackhole.cc"
)
ENDIF
(
WITH_BLACKHOLE_STORAGE_ENGINE
)
ENDIF
(
WITH_BLACKHOLE_STORAGE_ENGINE
)
IF
(
WITH_CSV_STORAGE_ENGINE
)
ADD_DEFINITIONS
(
-D WITH_CSV_STORAGE_ENGINE
)
SET
(
mysql_se_htons
"
${
mysql_se_htons
}
, &tina_hton"
)
SET
(
mysql_se_decls
"
${
mysql_se_decls
}
, tina_hton"
)
SET
(
mysql_se_ha_src
${
mysql_se_ha_src
}
"../storage/csv/ha_tina.cc"
)
ENDIF
(
WITH_CSV_STORAGE_ENGINE
)
IF
(
WITH_EXAMPLE_STORAGE_ENGINE
)
IF
(
WITH_EXAMPLE_STORAGE_ENGINE
)
ADD_DEFINITIONS
(
-D WITH_EXAMPLE_STORAGE_ENGINE
)
ADD_DEFINITIONS
(
-D WITH_EXAMPLE_STORAGE_ENGINE
)
SET
(
mysql_se_htons
"
${
mysql_se_htons
}
, &example_hton"
)
SET
(
mysql_se_htons
"
${
mysql_se_htons
}
, &example_hton"
)
...
...
libmysql/mytest.c
View file @
afaa4e2b
/*C4*/
/*C4*/
/****************************************************************/
/****************************************************************/
/* Author: Jethro Wright, III TS : 3/ 4/1998 9:15 */
/* Author: Jethro Wright, III TS : 3/ 4/1998 9:15 */
/* Date: 02/18/1998 */
/* Date: 02/18/1998 */
/* mytest.c : do some testing of the libmySQL.DLL.... */
/* mytest.c : do some testing of the libmySQL.DLL.... */
/* */
/* */
/* History: */
/* History: */
/* 02/18/1998 jw3 also sprach zarathustra.... */
/* 02/18/1998 jw3 also sprach zarathustra.... */
/****************************************************************/
/****************************************************************/
#include <windows.h>
#include <windows.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <mysql.h>
#include <mysql.h>
#define DEFALT_SQL_STMT "SELECT * FROM db"
#define DEFALT_SQL_STMT "SELECT * FROM db"
#ifndef offsetof
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
#endif
/********************************************************
/********************************************************
**
**
** main :-
** main :-
**
**
********************************************************/
********************************************************/
int
int
main
(
int
argc
,
char
*
argv
[]
)
main
(
int
argc
,
char
*
argv
[]
)
{
{
char
szSQL
[
200
],
aszFlds
[
25
][
25
],
szDB
[
50
]
;
char
szSQL
[
200
],
aszFlds
[
25
][
25
],
szDB
[
50
]
;
const
char
*
pszT
;
const
char
*
pszT
;
int
i
,
j
,
k
,
l
,
x
;
int
i
,
j
,
k
,
l
,
x
;
MYSQL
*
myData
;
MYSQL
*
myData
;
MYSQL_RES
*
res
;
MYSQL_RES
*
res
;
MYSQL_FIELD
*
fd
;
MYSQL_FIELD
*
fd
;
MYSQL_ROW
row
;
MYSQL_ROW
row
;
//....just curious....
//....just curious....
printf
(
"sizeof( MYSQL ) == %d
\n
"
,
(
int
)
sizeof
(
MYSQL
)
)
;
printf
(
"sizeof( MYSQL ) == %d
\n
"
,
(
int
)
sizeof
(
MYSQL
)
)
;
if
(
argc
==
2
)
if
(
argc
==
2
)
{
{
strcpy
(
szDB
,
argv
[
1
]
)
;
strcpy
(
szDB
,
argv
[
1
]
)
;
strcpy
(
szSQL
,
DEFALT_SQL_STMT
)
;
strcpy
(
szSQL
,
DEFALT_SQL_STMT
)
;
if
(
!
strcmp
(
szDB
,
"--debug"
))
if
(
!
strcmp
(
szDB
,
"--debug"
))
{
{
strcpy
(
szDB
,
"mysql"
)
;
strcpy
(
szDB
,
"mysql"
)
;
printf
(
"Some mysql struct information (size and offset):
\n
"
);
printf
(
"Some mysql struct information (size and offset):
\n
"
);
printf
(
"net:
\t
%3d %3d
\n
"
,(
int
)
sizeof
(
myData
->
net
),
printf
(
"net:
\t
%3d %3d
\n
"
,(
int
)
sizeof
(
myData
->
net
),
(
int
)
offsetof
(
MYSQL
,
net
));
(
int
)
offsetof
(
MYSQL
,
net
));
printf
(
"host:
\t
%3d %3d
\n
"
,(
int
)
sizeof
(
myData
->
host
),
printf
(
"host:
\t
%3d %3d
\n
"
,(
int
)
sizeof
(
myData
->
host
),
...
@@ -75,101 +124,199 @@ main( int argc, char * argv[] )
...
@@ -75,101 +124,199 @@ main( int argc, char * argv[] )
printf
(
"options:
\t
%3d %3d
\n
"
,(
int
)
sizeof
(
myData
->
options
),
printf
(
"options:
\t
%3d %3d
\n
"
,(
int
)
sizeof
(
myData
->
options
),
(
int
)
offsetof
(
MYSQL
,
options
));
(
int
)
offsetof
(
MYSQL
,
options
));
puts
(
""
);
puts
(
""
);
}
}
}
}
else
if
(
argc
>
2
)
{
else
if
(
argc
>
2
)
{
strcpy
(
szDB
,
argv
[
1
]
)
;
strcpy
(
szDB
,
argv
[
1
]
)
;
strcpy
(
szSQL
,
argv
[
2
]
)
;
strcpy
(
szSQL
,
argv
[
2
]
)
;
}
}
else
{
else
{
strcpy
(
szDB
,
"mysql"
)
;
strcpy
(
szDB
,
"mysql"
)
;
strcpy
(
szSQL
,
DEFALT_SQL_STMT
)
;
strcpy
(
szSQL
,
DEFALT_SQL_STMT
)
;
}
}
//....
//....
if
(
(
myData
=
mysql_init
((
MYSQL
*
)
0
))
&&
if
(
(
myData
=
mysql_init
((
MYSQL
*
)
0
))
&&
mysql_real_connect
(
myData
,
NULL
,
NULL
,
NULL
,
NULL
,
MYSQL_PORT
,
mysql_real_connect
(
myData
,
NULL
,
NULL
,
NULL
,
NULL
,
MYSQL_PORT
,
NULL
,
0
)
)
NULL
,
0
)
)
{
{
myData
->
reconnect
=
1
;
myData
->
reconnect
=
1
;
if
(
mysql_select_db
(
myData
,
szDB
)
<
0
)
{
if
(
mysql_select_db
(
myData
,
szDB
)
<
0
)
{
printf
(
"Can't select the %s database !
\n
"
,
szDB
)
;
printf
(
"Can't select the %s database !
\n
"
,
szDB
)
;
mysql_close
(
myData
)
;
mysql_close
(
myData
)
;
return
2
;
return
2
;
}
}
}
}
else
{
else
{
printf
(
"Can't connect to the mysql server on port %d !
\n
"
,
printf
(
"Can't connect to the mysql server on port %d !
\n
"
,
MYSQL_PORT
)
;
MYSQL_PORT
)
;
mysql_close
(
myData
)
;
mysql_close
(
myData
)
;
return
1
;
return
1
;
}
}
//....
//....
if
(
!
mysql_query
(
myData
,
szSQL
)
)
{
if
(
!
mysql_query
(
myData
,
szSQL
)
)
{
res
=
mysql_store_result
(
myData
)
;
res
=
mysql_store_result
(
myData
)
;
i
=
(
int
)
mysql_num_rows
(
res
)
;
l
=
1
;
i
=
(
int
)
mysql_num_rows
(
res
)
;
l
=
1
;
printf
(
"Query: %s
\n
Number of records found: %ld
\n
"
,
szSQL
,
i
)
;
printf
(
"Query: %s
\n
Number of records found: %ld
\n
"
,
szSQL
,
i
)
;
//....we can get the field-specific characteristics here....
//....we can get the field-specific characteristics here....
for
(
x
=
0
;
fd
=
mysql_fetch_field
(
res
)
;
x
++
)
for
(
x
=
0
;
fd
=
mysql_fetch_field
(
res
)
;
x
++
)
strcpy
(
aszFlds
[
x
],
fd
->
name
)
;
strcpy
(
aszFlds
[
x
],
fd
->
name
)
;
//....
//....
while
(
row
=
mysql_fetch_row
(
res
)
)
{
while
(
row
=
mysql_fetch_row
(
res
)
)
{
j
=
mysql_num_fields
(
res
)
;
j
=
mysql_num_fields
(
res
)
;
printf
(
"Record #%ld:-
\n
"
,
l
++
)
;
printf
(
"Record #%ld:-
\n
"
,
l
++
)
;
for
(
k
=
0
;
k
<
j
;
k
++
)
for
(
k
=
0
;
k
<
j
;
k
++
)
printf
(
" Fld #%d (%s): %s
\n
"
,
k
+
1
,
aszFlds
[
k
],
printf
(
" Fld #%d (%s): %s
\n
"
,
k
+
1
,
aszFlds
[
k
],
(((
row
[
k
]
==
NULL
)
||
(
!
strlen
(
row
[
k
])))
?
"NULL"
:
row
[
k
]))
;
(((
row
[
k
]
==
NULL
)
||
(
!
strlen
(
row
[
k
])))
?
"NULL"
:
row
[
k
]))
;
puts
(
"==============================
\n
"
)
;
puts
(
"==============================
\n
"
)
;
}
}
mysql_free_result
(
res
)
;
mysql_free_result
(
res
)
;
}
}
else
printf
(
"Couldn't execute %s on the server !
\n
"
,
szSQL
)
;
else
printf
(
"Couldn't execute %s on the server !
\n
"
,
szSQL
)
;
//....
//....
puts
(
"==== Diagnostic info ===="
)
;
puts
(
"==== Diagnostic info ===="
)
;
pszT
=
mysql_get_client_info
()
;
pszT
=
mysql_get_client_info
()
;
printf
(
"Client info: %s
\n
"
,
pszT
)
;
printf
(
"Client info: %s
\n
"
,
pszT
)
;
//....
//....
pszT
=
mysql_get_host_info
(
myData
)
;
pszT
=
mysql_get_host_info
(
myData
)
;
printf
(
"Host info: %s
\n
"
,
pszT
)
;
printf
(
"Host info: %s
\n
"
,
pszT
)
;
//....
//....
pszT
=
mysql_get_server_info
(
myData
)
;
pszT
=
mysql_get_server_info
(
myData
)
;
printf
(
"Server info: %s
\n
"
,
pszT
)
;
printf
(
"Server info: %s
\n
"
,
pszT
)
;
//....
//....
res
=
mysql_list_processes
(
myData
)
;
l
=
1
;
res
=
mysql_list_processes
(
myData
)
;
l
=
1
;
if
(
res
)
if
(
res
)
{
{
for
(
x
=
0
;
fd
=
mysql_fetch_field
(
res
)
;
x
++
)
for
(
x
=
0
;
fd
=
mysql_fetch_field
(
res
)
;
x
++
)
strcpy
(
aszFlds
[
x
],
fd
->
name
)
;
strcpy
(
aszFlds
[
x
],
fd
->
name
)
;
while
(
row
=
mysql_fetch_row
(
res
)
)
{
while
(
row
=
mysql_fetch_row
(
res
)
)
{
j
=
mysql_num_fields
(
res
)
;
j
=
mysql_num_fields
(
res
)
;
printf
(
"Process #%ld:-
\n
"
,
l
++
)
;
printf
(
"Process #%ld:-
\n
"
,
l
++
)
;
for
(
k
=
0
;
k
<
j
;
k
++
)
for
(
k
=
0
;
k
<
j
;
k
++
)
printf
(
" Fld #%d (%s): %s
\n
"
,
k
+
1
,
aszFlds
[
k
],
printf
(
" Fld #%d (%s): %s
\n
"
,
k
+
1
,
aszFlds
[
k
],
(((
row
[
k
]
==
NULL
)
||
(
!
strlen
(
row
[
k
])))
?
"NULL"
:
row
[
k
]))
;
(((
row
[
k
]
==
NULL
)
||
(
!
strlen
(
row
[
k
])))
?
"NULL"
:
row
[
k
]))
;
puts
(
"==============================
\n
"
)
;
puts
(
"==============================
\n
"
)
;
}
}
}
}
else
else
{
{
printf
(
"Got error %s when retreiving processlist
\n
"
,
mysql_error
(
myData
));
printf
(
"Got error %s when retreiving processlist
\n
"
,
mysql_error
(
myData
));
}
}
//....
//....
res
=
mysql_list_tables
(
myData
,
"%"
)
;
l
=
1
;
res
=
mysql_list_tables
(
myData
,
"%"
)
;
l
=
1
;
for
(
x
=
0
;
fd
=
mysql_fetch_field
(
res
)
;
x
++
)
for
(
x
=
0
;
fd
=
mysql_fetch_field
(
res
)
;
x
++
)
strcpy
(
aszFlds
[
x
],
fd
->
name
)
;
strcpy
(
aszFlds
[
x
],
fd
->
name
)
;
while
(
row
=
mysql_fetch_row
(
res
)
)
{
while
(
row
=
mysql_fetch_row
(
res
)
)
{
j
=
mysql_num_fields
(
res
)
;
j
=
mysql_num_fields
(
res
)
;
printf
(
"Table #%ld:-
\n
"
,
l
++
)
;
printf
(
"Table #%ld:-
\n
"
,
l
++
)
;
for
(
k
=
0
;
k
<
j
;
k
++
)
for
(
k
=
0
;
k
<
j
;
k
++
)
printf
(
" Fld #%d (%s): %s
\n
"
,
k
+
1
,
aszFlds
[
k
],
printf
(
" Fld #%d (%s): %s
\n
"
,
k
+
1
,
aszFlds
[
k
],
(((
row
[
k
]
==
NULL
)
||
(
!
strlen
(
row
[
k
])))
?
"NULL"
:
row
[
k
]))
;
(((
row
[
k
]
==
NULL
)
||
(
!
strlen
(
row
[
k
])))
?
"NULL"
:
row
[
k
]))
;
puts
(
"==============================
\n
"
)
;
puts
(
"==============================
\n
"
)
;
}
}
//....
//....
pszT
=
mysql_stat
(
myData
)
;
pszT
=
mysql_stat
(
myData
)
;
puts
(
pszT
)
;
puts
(
pszT
)
;
//....
//....
mysql_close
(
myData
)
;
mysql_close
(
myData
)
;
return
0
;
return
0
;
}
}
libmysqld/lib_sql.cc
View file @
afaa4e2b
...
@@ -274,7 +274,6 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
...
@@ -274,7 +274,6 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
{
{
DBUG_ENTER
(
"emb_stmt_execute"
);
DBUG_ENTER
(
"emb_stmt_execute"
);
char
header
[
5
];
char
header
[
5
];
MYSQL_DATA
*
res
;
THD
*
thd
;
THD
*
thd
;
int4store
(
header
,
stmt
->
stmt_id
);
int4store
(
header
,
stmt
->
stmt_id
);
...
@@ -1033,7 +1032,6 @@ void Protocol_simple::prepare_for_resend()
...
@@ -1033,7 +1032,6 @@ void Protocol_simple::prepare_for_resend()
data
->
embedded_info
->
prev_ptr
=
&
cur
->
next
;
data
->
embedded_info
->
prev_ptr
=
&
cur
->
next
;
next_field
=
cur
->
data
;
next_field
=
cur
->
data
;
next_mysql_field
=
data
->
embedded_info
->
fields_list
;
next_mysql_field
=
data
->
embedded_info
->
fields_list
;
err:
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
...
mysql-test/r/csv.result
View file @
afaa4e2b
...
@@ -5085,6 +5085,36 @@ Table Op Msg_type Msg_text
...
@@ -5085,6 +5085,36 @@ Table Op Msg_type Msg_text
test.test_repair_table5 repair status OK
test.test_repair_table5 repair status OK
SELECT * FROM test_repair_table5;
SELECT * FROM test_repair_table5;
num magic_no company_name founded
num magic_no company_name founded
INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT", 1876);
SELECT * FROM test_repair_table5;
num magic_no company_name founded
1 0102 CORRECT 1876
FLUSH TABLES;
CHECK TABLE test_repair_table5;
Table Op Msg_type Msg_text
test.test_repair_table5 check error Corrupt
REPAIR TABLE test_repair_table5;
Table Op Msg_type Msg_text
test.test_repair_table5 repair status OK
SELECT * FROM test_repair_table5;
num magic_no company_name founded
1 0102 CORRECT 1876
INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT2", 1876);
SELECT * FROM test_repair_table5;
num magic_no company_name founded
1 0102 CORRECT 1876
1 0102 CORRECT2 1876
FLUSH TABLES;
CHECK TABLE test_repair_table5;
Table Op Msg_type Msg_text
test.test_repair_table5 check error Corrupt
REPAIR TABLE test_repair_table5;
Table Op Msg_type Msg_text
test.test_repair_table5 repair status OK
SELECT * FROM test_repair_table5;
num magic_no company_name founded
1 0102 CORRECT 1876
1 0102 CORRECT2 1876
DROP TABLE test_repair_table5;
DROP TABLE test_repair_table5;
create table t1 (a int) engine=csv;
create table t1 (a int) engine=csv;
insert t1 values (1);
insert t1 values (1);
...
...
mysql-test/t/csv.test
View file @
afaa4e2b
...
@@ -1477,8 +1477,29 @@ CREATE TABLE test_repair_table5 (
...
@@ -1477,8 +1477,29 @@ CREATE TABLE test_repair_table5 (
CHECK
TABLE
test_repair_table5
;
CHECK
TABLE
test_repair_table5
;
REPAIR
TABLE
test_repair_table5
;
REPAIR
TABLE
test_repair_table5
;
SELECT
*
FROM
test_repair_table5
;
SELECT
*
FROM
test_repair_table5
;
DROP
TABLE
test_repair_table5
;
INSERT
INTO
test_repair_table5
VALUES
(
1
,
102
,
"CORRECT"
,
1876
);
SELECT
*
FROM
test_repair_table5
;
# Corrupt a table -- put a row with wrong # of columns at end of file
--
exec
perl
-
e
'print "\"1\",\"101\",\"IBM\"\n";'
>>
$MYSQLTEST_VARDIR
/
master
-
data
/
test
/
test_repair_table5
.
CSV
FLUSH
TABLES
;
CHECK
TABLE
test_repair_table5
;
REPAIR
TABLE
test_repair_table5
;
# The correct record inserted should still be in the file
SELECT
*
FROM
test_repair_table5
;
INSERT
INTO
test_repair_table5
VALUES
(
1
,
102
,
"CORRECT2"
,
1876
);
SELECT
*
FROM
test_repair_table5
;
# Corrupt table again -- put a row with wrong # of columns at end of file
--
exec
perl
-
e
'print "\"1\",\"101\",\"IBM\"\n";'
>>
$MYSQLTEST_VARDIR
/
master
-
data
/
test
/
test_repair_table5
.
CSV
FLUSH
TABLES
;
CHECK
TABLE
test_repair_table5
;
REPAIR
TABLE
test_repair_table5
;
# The two correct records inserted should still be in the file
SELECT
*
FROM
test_repair_table5
;
DROP
TABLE
test_repair_table5
;
#
#
# BUG#13406 - incorrect amount of "records deleted"
# BUG#13406 - incorrect amount of "records deleted"
...
...
server-tools/instance-manager/guardian.cc
View file @
afaa4e2b
...
@@ -201,8 +201,6 @@ void Guardian_thread::run()
...
@@ -201,8 +201,6 @@ void Guardian_thread::run()
while
(
node
!=
NULL
)
while
(
node
!=
NULL
)
{
{
struct
timespec
timeout
;
GUARD_NODE
*
current_node
=
(
GUARD_NODE
*
)
node
->
data
;
GUARD_NODE
*
current_node
=
(
GUARD_NODE
*
)
node
->
data
;
instance
=
((
GUARD_NODE
*
)
node
->
data
)
->
instance
;
instance
=
((
GUARD_NODE
*
)
node
->
data
)
->
instance
;
process_instance
(
instance
,
current_node
,
&
guarded_instances
,
node
);
process_instance
(
instance
,
current_node
,
&
guarded_instances
,
node
);
...
...
server-tools/instance-manager/mysql_connection.cc
View file @
afaa4e2b
...
@@ -136,7 +136,7 @@ int Mysql_connection_thread::init()
...
@@ -136,7 +136,7 @@ int Mysql_connection_thread::init()
/* Initialize random number generator */
/* Initialize random number generator */
{
{
ulong
seed1
=
(
ulong
)
&
rand_st
+
rand
();
ulong
seed1
=
(
ulong
)
&
rand_st
+
rand
();
ulong
seed2
=
rand
()
+
time
(
0
);
ulong
seed2
=
(
ulong
)
rand
()
+
time
(
0
);
randominit
(
&
rand_st
,
seed1
,
seed2
);
randominit
(
&
rand_st
,
seed1
,
seed2
);
}
}
/* Fill scramble - server's random message used for handshake */
/* Fill scramble - server's random message used for handshake */
...
...
sql/ha_partition.cc
View file @
afaa4e2b
...
@@ -1135,7 +1135,6 @@ int ha_partition::handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt,
...
@@ -1135,7 +1135,6 @@ int ha_partition::handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt,
partition_element
*
part_elem
=
part_it
++
;
partition_element
*
part_elem
=
part_it
++
;
if
(
all_parts
||
part_elem
->
part_state
==
PART_CHANGED
)
if
(
all_parts
||
part_elem
->
part_state
==
PART_CHANGED
)
{
{
handler
*
file
;
if
(
m_is_sub_partitioned
)
if
(
m_is_sub_partitioned
)
{
{
List_iterator
<
partition_element
>
sub_it
(
part_elem
->
subpartitions
);
List_iterator
<
partition_element
>
sub_it
(
part_elem
->
subpartitions
);
...
@@ -2311,7 +2310,7 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
...
@@ -2311,7 +2310,7 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
err_handler:
err_handler:
while
(
file
--
!=
m_file
)
while
(
file
--
!=
m_file
)
(
*
file
)
->
close
();
(
*
file
)
->
close
();
err:
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
}
}
...
@@ -2915,7 +2914,6 @@ int ha_partition::rnd_init(bool scan)
...
@@ -2915,7 +2914,6 @@ int ha_partition::rnd_init(bool scan)
int
error
;
int
error
;
uint
i
=
0
;
uint
i
=
0
;
uint32
part_id
;
uint32
part_id
;
handler
**
file
;
DBUG_ENTER
(
"ha_partition::rnd_init"
);
DBUG_ENTER
(
"ha_partition::rnd_init"
);
include_partition_fields_in_used_fields
();
include_partition_fields_in_used_fields
();
...
...
sql/sql_delete.cc
View file @
afaa4e2b
...
@@ -870,7 +870,6 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
...
@@ -870,7 +870,6 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
TABLE
*
table
;
TABLE
*
table
;
bool
error
;
bool
error
;
uint
closed_log_tables
=
0
,
lock_logger
=
0
;
uint
closed_log_tables
=
0
,
lock_logger
=
0
;
TABLE_LIST
*
tmp_table_list
;
uint
path_length
;
uint
path_length
;
DBUG_ENTER
(
"mysql_truncate"
);
DBUG_ENTER
(
"mysql_truncate"
);
...
...
sql/sql_handler.cc
View file @
afaa4e2b
...
@@ -337,7 +337,6 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
...
@@ -337,7 +337,6 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
ha_rows
select_limit_cnt
,
ha_rows
offset_limit_cnt
)
ha_rows
select_limit_cnt
,
ha_rows
offset_limit_cnt
)
{
{
TABLE_LIST
*
hash_tables
;
TABLE_LIST
*
hash_tables
;
TABLE
**
table_ptr
;
TABLE
*
table
;
TABLE
*
table
;
MYSQL_LOCK
*
lock
;
MYSQL_LOCK
*
lock
;
List
<
Item
>
list
;
List
<
Item
>
list
;
...
...
storage/csv/ha_tina.cc
View file @
afaa4e2b
...
@@ -451,6 +451,7 @@ static int free_share(TINA_SHARE *share)
...
@@ -451,6 +451,7 @@ static int free_share(TINA_SHARE *share)
result_code
=
1
;
result_code
=
1
;
if
(
share
->
mapped_file
)
if
(
share
->
mapped_file
)
my_munmap
(
share
->
mapped_file
,
share
->
file_stat
.
st_size
);
my_munmap
(
share
->
mapped_file
,
share
->
file_stat
.
st_size
);
share
->
mapped_file
=
NULL
;
result_code
=
my_close
(
share
->
data_file
,
MYF
(
0
));
result_code
=
my_close
(
share
->
data_file
,
MYF
(
0
));
hash_delete
(
&
tina_open_tables
,
(
byte
*
)
share
);
hash_delete
(
&
tina_open_tables
,
(
byte
*
)
share
);
thr_lock_delete
(
&
share
->
lock
);
thr_lock_delete
(
&
share
->
lock
);
...
@@ -1228,9 +1229,10 @@ int ha_tina::repair(THD* thd, HA_CHECK_OPT* check_opt)
...
@@ -1228,9 +1229,10 @@ int ha_tina::repair(THD* thd, HA_CHECK_OPT* check_opt)
my_free
((
char
*
)
buf
,
MYF
(
0
));
my_free
((
char
*
)
buf
,
MYF
(
0
));
/* The file is ok */
if
(
rc
==
HA_ERR_END_OF_FILE
)
if
(
rc
==
HA_ERR_END_OF_FILE
)
{
{
/* All rows were read ok until end of file, the file does not need repair. */
/*
/*
If rows_recorded != rows_repaired, we should update
If rows_recorded != rows_repaired, we should update
rows_recorded value to the current amount of rows.
rows_recorded value to the current amount of rows.
...
@@ -1258,11 +1260,29 @@ int ha_tina::repair(THD* thd, HA_CHECK_OPT* check_opt)
...
@@ -1258,11 +1260,29 @@ int ha_tina::repair(THD* thd, HA_CHECK_OPT* check_opt)
if
(
my_munmap
(
share
->
mapped_file
,
share
->
file_stat
.
st_size
))
if
(
my_munmap
(
share
->
mapped_file
,
share
->
file_stat
.
st_size
))
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
my_rename
(
repaired_fname
,
share
->
data_file_name
,
MYF
(
0
));
/* We set it to null so that get_mmap() won't try to unmap it */
/* We set it to null so that get_mmap() won't try to unmap it */
share
->
mapped_file
=
NULL
;
share
->
mapped_file
=
NULL
;
/*
Close the "to"-file before renaming
On Windows one cannot rename a file, which descriptor
is still open. EACCES will be returned when trying to delete
the "to"-file in my_rename()
*/
my_close
(
share
->
data_file
,
MYF
(
0
));
if
(
my_rename
(
repaired_fname
,
share
->
data_file_name
,
MYF
(
0
)))
DBUG_RETURN
(
-
1
);
/* Open the file again, it should now be repaired */
if
((
share
->
data_file
=
my_open
(
share
->
data_file_name
,
O_RDWR
|
O_APPEND
,
MYF
(
0
)))
==
-
1
)
DBUG_RETURN
(
-
1
);
/* Seek to end of file, any inserts will be appended there */
if
(
my_seek
(
share
->
data_file
,
0
,
SEEK_END
,
MYF
(
0
))
==
MY_FILEPOS_ERROR
)
DBUG_RETURN
(
-
1
);
if
(
get_mmap
(
share
,
0
)
>
0
)
if
(
get_mmap
(
share
,
0
)
>
0
)
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
...
...
win/README
View file @
afaa4e2b
...
@@ -75,3 +75,8 @@ Current issues
...
@@ -75,3 +75,8 @@ Current issues
--------------
--------------
1. After changing configuration (eg. adding or removing a storage engine), it
1. After changing configuration (eg. adding or removing a storage engine), it
may be necessary to clean the build tree to remove any stale objects.
may be necessary to clean the build tree to remove any stale objects.
2. To use Visual C++ Express Edition you also need to install the Platform SDK.
Please see this link: http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
At step 4 you only need to add the libraries advapi32.lib and user32.lib to
the file "corewin_express.vsprops" in order to avoid link errors.
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