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
e125c953
Commit
e125c953
authored
Apr 06, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/mydev/mysql-5.1
into mysql.com:/home/mydev/mysql-5.1-aid
parents
8f2fb4ba
6de776f7
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
151 additions
and
51 deletions
+151
-51
include/my_sys.h
include/my_sys.h
+1
-0
libmysql/libmysql.c
libmysql/libmysql.c
+0
-29
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+53
-2
mysql-test/r/ctype_latin1.result
mysql-test/r/ctype_latin1.result
+22
-0
mysql-test/t/ctype_latin1.test
mysql-test/t/ctype_latin1.test
+14
-0
mysys/my_mmap.c
mysys/my_mmap.c
+1
-4
sql-common/client.c
sql-common/client.c
+33
-0
storage/csv/ha_tina.cc
storage/csv/ha_tina.cc
+20
-11
storage/csv/ha_tina.h
storage/csv/ha_tina.h
+3
-3
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
+4
-2
No files found.
include/my_sys.h
View file @
e125c953
...
...
@@ -850,6 +850,7 @@ my_bool my_gethwaddr(uchar *to);
#define PROT_WRITE 2
#define MAP_NORESERVE 0
#define MAP_SHARED 0x0001
#define MAP_PRIVATE 0x0002
#define MAP_NOSYNC 0x0800
#define MAP_FAILED ((void *)-1)
#define MS_SYNC 0x0000
...
...
libmysql/libmysql.c
View file @
e125c953
...
...
@@ -1380,35 +1380,6 @@ mysql_get_server_info(MYSQL *mysql)
}
/*
Get version number for server in a form easy to test on
SYNOPSIS
mysql_get_server_version()
mysql Connection
EXAMPLE
4.1.0-alfa -> 40100
NOTES
We will ensure that a newer server always has a bigger number.
RETURN
Signed number > 323000
*/
ulong
STDCALL
mysql_get_server_version
(
MYSQL
*
mysql
)
{
uint
major
,
minor
,
version
;
char
*
pos
=
mysql
->
server_version
,
*
end_pos
;
major
=
(
uint
)
strtoul
(
pos
,
&
end_pos
,
10
);
pos
=
end_pos
+
1
;
minor
=
(
uint
)
strtoul
(
pos
,
&
end_pos
,
10
);
pos
=
end_pos
+
1
;
version
=
(
uint
)
strtoul
(
pos
,
&
end_pos
,
10
);
return
(
ulong
)
major
*
10000L
+
(
ulong
)
(
minor
*
100
+
version
);
}
const
char
*
STDCALL
mysql_get_host_info
(
MYSQL
*
mysql
)
{
...
...
mysql-test/mysql-test-run.pl
View file @
e125c953
...
...
@@ -230,6 +230,8 @@ our $opt_client_ddd;
our
$opt_manual_gdb
;
our
$opt_manual_ddd
;
our
$opt_manual_debug
;
our
$opt_debugger
;
our
$opt_client_debugger
;
our
$opt_gprof
;
our
$opt_gprof_dir
;
...
...
@@ -633,6 +635,8 @@ sub command_line_setup () {
'
manual-debug
'
=>
\
$opt_manual_debug
,
'
ddd
'
=>
\
$opt_ddd
,
'
client-ddd
'
=>
\
$opt_client_ddd
,
'
debugger=s
'
=>
\
$opt_debugger
,
'
client-debugger=s
'
=>
\
$opt_client_debugger
,
'
strace-client
'
=>
\
$opt_strace_client
,
'
master-binary=s
'
=>
\
$exe_master_mysqld
,
'
slave-binary=s
'
=>
\
$exe_slave_mysqld
,
...
...
@@ -812,9 +816,10 @@ sub command_line_setup () {
# Check debug related options
if
(
$opt_gdb
||
$opt_client_gdb
||
$opt_ddd
||
$opt_client_ddd
||
$opt_manual_gdb
||
$opt_manual_ddd
||
$opt_manual_debug
)
$opt_manual_gdb
||
$opt_manual_ddd
||
$opt_manual_debug
||
$opt_debugger
||
$opt_client_debugger
)
{
# Indicate that we are using debugger
# Indicate that we are using debugger
$glob_debugger
=
1
;
# Increase timeouts
$opt_wait_timeout
=
300
;
...
...
@@ -2798,6 +2803,10 @@ sub mysqld_start ($$$$$) {
{
ddd_arguments
(
\
$args
,
\
$exe
,
"
$type
"
.
"
_
$idx
");
}
elsif
(
$opt_debugger
)
{
debugger_arguments
(
\
$args
,
\
$exe
,
"
$type
"
.
"
_
$idx
");
}
elsif
(
$opt_manual_debug
)
{
print
"
\n
Start
$type
in your debugger
\n
"
.
...
...
@@ -3324,6 +3333,10 @@ sub run_mysqltest ($) {
{
ddd_arguments
(
\
$args
,
\
$exe
,
"
client
");
}
elsif
(
$opt_client_debugger
)
{
debugger_arguments
(
\
$args
,
\
$exe
,
"
client
");
}
if
(
$glob_use_libtool
and
$opt_valgrind
)
{
...
...
@@ -3476,6 +3489,42 @@ sub ddd_arguments {
mtr_add_arg
(
$$args
,
"
$save_exe
");
}
#
# Modify the exe and args so that program is run in the selected debugger
#
sub
debugger_arguments
{
my
$args
=
shift
;
my
$exe
=
shift
;
my
$debugger
=
$opt_debugger
||
$opt_client_debugger
;
if
(
$debugger
eq
"
vcexpress
"
or
$debugger
eq
"
vc
")
{
# vc[express] /debugexe exe arg1 .. argn
# Add /debugexe and name of the exe before args
unshift
(
@$$args
,
"
/debugexe
");
unshift
(
@$$args
,
"
$
$exe
");
}
elsif
(
$debugger
eq
"
windbg
"
)
{
# windbg exe arg1 .. argn
# Add name of the exe before args
unshift
(
@$$args
,
"
$
$exe
");
}
else
{
mtr_error
("
Unknown argument
\"
$debugger
\"
passed to --debugger
");
}
# Set exe to debuggername
$$exe
=
$debugger
;
}
#
# Modify the exe and args so that program is run in valgrind
#
...
...
@@ -3588,6 +3637,8 @@ Options for debugging the product
client-gdb Start mysqltest client in gdb
ddd Start mysqld in ddd
client-ddd Start mysqltest client in ddd
debugger=NAME Start mysqld in the selected debugger
client-debugger=NAME Start mysqltest in the selected debugger
strace-client FIXME
master-binary=PATH Specify the master "mysqld" to use
slave-binary=PATH Specify the slave "mysqld" to use
...
...
mysql-test/r/ctype_latin1.result
View file @
e125c953
...
...
@@ -369,3 +369,25 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SELECT 'a' as str;
str
a
set @str= _latin1 'ABC ߲~ @ abc';
SELECT convert(@str collate latin1_bin using utf8);
convert(@str collate latin1_bin using utf8)
ABC ߲~ @ abc
SELECT convert(@str collate latin1_general_ci using utf8);
convert(@str collate latin1_general_ci using utf8)
ABC ߲~ @ abc
SELECT convert(@str collate latin1_german1_ci using utf8);
convert(@str collate latin1_german1_ci using utf8)
ABC ߲~ @ abc
SELECT convert(@str collate latin1_danish_ci using utf8);
convert(@str collate latin1_danish_ci using utf8)
ABC ߲~ @ abc
SELECT convert(@str collate latin1_spanish_ci using utf8);
convert(@str collate latin1_spanish_ci using utf8)
ABC ߲~ @ abc
SELECT convert(@str collate latin1_german2_ci using utf8);
convert(@str collate latin1_german2_ci using utf8)
ABC ߲~ @ abc
SELECT convert(@str collate latin1_swedish_ci using utf8);
convert(@str collate latin1_swedish_ci using utf8)
ABC ߲~ @ abc
mysql-test/t/ctype_latin1.test
View file @
e125c953
...
...
@@ -95,4 +95,18 @@ SET collation_connection='latin1_bin';
CREATE
TABLE
a
(
a
int
);
SELECT
'a'
as
str
;
#
# Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci
# The problem was in latin1->utf8->latin1 round trip.
#
set
@
str
=
_latin1
'ABC ߲~ @ abc'
;
SELECT
convert
(
@
str
collate
latin1_bin
using
utf8
);
SELECT
convert
(
@
str
collate
latin1_general_ci
using
utf8
);
SELECT
convert
(
@
str
collate
latin1_german1_ci
using
utf8
);
SELECT
convert
(
@
str
collate
latin1_danish_ci
using
utf8
);
SELECT
convert
(
@
str
collate
latin1_spanish_ci
using
utf8
);
SELECT
convert
(
@
str
collate
latin1_german2_ci
using
utf8
);
SELECT
convert
(
@
str
collate
latin1_swedish_ci
using
utf8
);
# End of 4.1 tests
mysys/my_mmap.c
View file @
e125c953
...
...
@@ -43,22 +43,19 @@ int my_getpagesize(void)
void
*
my_mmap
(
void
*
addr
,
size_t
len
,
int
prot
,
int
flags
,
int
fd
,
my_off_t
offset
)
{
DWORD
flProtect
=
0
;
HANDLE
hFileMap
;
LPVOID
ptr
;
HANDLE
hFile
=
(
HANDLE
)
_get_osfhandle
(
fd
);
if
(
hFile
==
INVALID_HANDLE_VALUE
)
return
MAP_FAILED
;
flProtect
|=
SEC_COMMIT
;
hFileMap
=
CreateFileMapping
(
hFile
,
&
mmap_security_attributes
,
PAGE_READWRITE
,
0
,
(
DWORD
)
len
,
NULL
);
if
(
hFileMap
==
0
)
return
MAP_FAILED
;
ptr
=
MapViewOfFile
(
hFileMap
,
flags
&
PROT_WRITE
?
FILE_MAP_WRITE
:
FILE_MAP_READ
,
prot
&
PROT_WRITE
?
FILE_MAP_WRITE
:
FILE_MAP_READ
,
(
DWORD
)(
offset
>>
32
),
(
DWORD
)
offset
,
len
);
/*
...
...
sql-common/client.c
View file @
e125c953
...
...
@@ -2817,6 +2817,36 @@ const char * STDCALL mysql_error(MYSQL *mysql)
return
mysql
->
net
.
last_error
;
}
/*
Get version number for server in a form easy to test on
SYNOPSIS
mysql_get_server_version()
mysql Connection
EXAMPLE
4.1.0-alfa -> 40100
NOTES
We will ensure that a newer server always has a bigger number.
RETURN
Signed number > 323000
*/
ulong
STDCALL
mysql_get_server_version
(
MYSQL
*
mysql
)
{
uint
major
,
minor
,
version
;
char
*
pos
=
mysql
->
server_version
,
*
end_pos
;
major
=
(
uint
)
strtoul
(
pos
,
&
end_pos
,
10
);
pos
=
end_pos
+
1
;
minor
=
(
uint
)
strtoul
(
pos
,
&
end_pos
,
10
);
pos
=
end_pos
+
1
;
version
=
(
uint
)
strtoul
(
pos
,
&
end_pos
,
10
);
return
(
ulong
)
major
*
10000L
+
(
ulong
)
(
minor
*
100
+
version
);
}
/*
mysql_set_character_set function sends SET NAMES cs_name to
the server (which changes character_set_client, character_set_result
...
...
@@ -2836,6 +2866,9 @@ int STDCALL mysql_set_character_set(MYSQL *mysql, const char *cs_name)
{
char
buff
[
MY_CS_NAME_SIZE
+
10
];
charsets_dir
=
save_csdir
;
/* Skip execution of "SET NAMES" for pre-4.1 servers */
if
(
mysql_get_server_version
(
mysql
)
<
40100
)
return
0
;
sprintf
(
buff
,
"SET NAMES %s"
,
cs_name
);
if
(
!
mysql_real_query
(
mysql
,
buff
,
strlen
(
buff
)))
{
...
...
storage/csv/ha_tina.cc
View file @
e125c953
...
...
@@ -49,7 +49,6 @@
#include "mysql_priv.h"
#include "ha_tina.h"
#include <sys/mman.h>
#include <mysql/plugin.h>
...
...
@@ -161,7 +160,7 @@ int get_mmap(TINA_SHARE *share, int write)
share
->
mapped_file
=
(
byte
*
)
my_mmap
(
NULL
,
share
->
file_stat
.
st_size
,
PROT_READ
,
MAP_PRIVATE
,
share
->
data_file
,
0
);
if
((
share
->
mapped_file
==
(
caddr_t
)
-
1
))
if
((
share
->
mapped_file
==
MAP_FAILED
))
{
/*
Bad idea you think? See the problem is that nothing actually checks
...
...
@@ -499,7 +498,7 @@ ha_tina::ha_tina(TABLE_SHARE *table_arg)
records_is_known
(
0
)
{
/* Set our original buffers from pre-allocated memory */
buffer
.
set
(
byte_buffer
,
IO_SIZE
,
system_charset_info
);
buffer
.
set
(
(
char
*
)
byte_buffer
,
IO_SIZE
,
system_charset_info
);
chain
=
chain_buffer
;
}
...
...
@@ -877,7 +876,8 @@ int ha_tina::write_row(byte * buf)
size
=
encode_quote
(
buf
);
if
(
my_write
(
share
->
data_file
,
buffer
.
ptr
(),
size
,
MYF
(
MY_WME
|
MY_NABP
)))
if
(
my_write
(
share
->
data_file
,
(
byte
*
)
buffer
.
ptr
(),
size
,
MYF
(
MY_WME
|
MY_NABP
)))
DBUG_RETURN
(
-
1
);
/*
...
...
@@ -929,7 +929,8 @@ int ha_tina::update_row(const byte * old_data, byte * new_data)
if
(
chain_append
())
DBUG_RETURN
(
-
1
);
if
(
my_write
(
share
->
data_file
,
buffer
.
ptr
(),
size
,
MYF
(
MY_WME
|
MY_NABP
)))
if
(
my_write
(
share
->
data_file
,
(
byte
*
)
buffer
.
ptr
(),
size
,
MYF
(
MY_WME
|
MY_NABP
)))
DBUG_RETURN
(
-
1
);
/* UPDATE should never happen on the log tables */
...
...
@@ -1130,7 +1131,7 @@ int ha_tina::rnd_end()
if
((
chain_ptr
-
chain
)
>
0
)
{
tina_set
*
ptr
;
off
_t
length
;
size
_t
length
;
/*
Setting up writable map, this will contain all of the data after the
...
...
@@ -1154,15 +1155,16 @@ int ha_tina::rnd_end()
length
=
length
-
(
size_t
)(
ptr
->
end
-
ptr
->
begin
);
}
/*
Truncate the file to the new size
*/
if
(
my_
chsize
(
share
->
data_file
,
length
,
0
,
MYF
(
MY_WME
)
))
/*
Unmap the file before the new size is set
*/
if
(
my_
munmap
(
share
->
mapped_file
,
share
->
file_stat
.
st_size
))
DBUG_RETURN
(
-
1
);
/* We set it to null so that get_mmap() won't try to unmap it */
share
->
mapped_file
=
NULL
;
if
(
my_munmap
(
share
->
mapped_file
,
length
))
/* Set the file to the new size */
if
(
my_chsize
(
share
->
data_file
,
length
,
0
,
MYF
(
MY_WME
)))
DBUG_RETURN
(
-
1
);
/* We set it to null so that get_mmap() won't try to unmap it */
share
->
mapped_file
=
NULL
;
if
(
get_mmap
(
share
,
0
)
>
0
)
DBUG_RETURN
(
-
1
);
}
...
...
@@ -1281,6 +1283,13 @@ int ha_tina::delete_all_rows()
if
(
!
records_is_known
)
DBUG_RETURN
(
my_errno
=
HA_ERR_WRONG_COMMAND
);
/* Unmap the file before the new size is set */
if
(
share
->
mapped_file
&&
my_munmap
(
share
->
mapped_file
,
share
->
file_stat
.
st_size
))
DBUG_RETURN
(
-
1
);
share
->
mapped_file
=
NULL
;
/* Truncate the file to zero size */
rc
=
my_chsize
(
share
->
data_file
,
0
,
0
,
MYF
(
MY_WME
));
if
(
get_mmap
(
share
,
0
)
>
0
)
...
...
storage/csv/ha_tina.h
View file @
e125c953
...
...
@@ -51,9 +51,9 @@ typedef struct st_tina_share {
ha_rows
rows_recorded
;
/* Number of rows in tables */
}
TINA_SHARE
;
typedef
struct
tina_set
{
off_t
begin
;
off_t
end
;
struct
tina_set
{
off_t
begin
;
off_t
end
;
};
class
ha_tina
:
public
handler
...
...
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
View file @
e125c953
...
...
@@ -233,7 +233,7 @@ sizeof(SimpleProperties::SP2StructMapping);
void
DictFilegroupInfo
::
Filegroup
::
init
(){
memset
(
FilegroupName
,
sizeof
(
FilegroupName
),
0
);
memset
(
FilegroupName
,
0
,
sizeof
(
FilegroupName
)
);
FilegroupType
=
~
0
;
FilegroupId
=
~
0
;
FilegroupVersion
=
~
0
;
...
...
@@ -244,8 +244,10 @@ DictFilegroupInfo::Filegroup::init(){
TS_DataGrow
.
GrowLimit
=
0
;
TS_DataGrow
.
GrowSizeHi
=
0
;
TS_DataGrow
.
GrowSizeLo
=
0
;
memset
(
TS_DataGrow
.
GrowPattern
,
sizeof
(
TS_DataGrow
.
GrowPattern
),
0
);
memset
(
TS_DataGrow
.
GrowPattern
,
0
,
sizeof
(
TS_DataGrow
.
GrowPattern
)
);
TS_DataGrow
.
GrowMaxSize
=
0
;
LF_UndoFreeWordsHi
=
0
;
LF_UndoFreeWordsLo
=
0
;
}
void
...
...
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