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
420d40d3
Commit
420d40d3
authored
Jul 25, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
parents
be1b24fe
84f3623b
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
84 additions
and
32 deletions
+84
-32
mysql-test/r/federated.result
mysql-test/r/federated.result
+16
-0
mysql-test/t/federated.test
mysql-test/t/federated.test
+20
-0
netware/BUILD/mwasmnlm
netware/BUILD/mwasmnlm
+4
-1
netware/BUILD/mwccnlm
netware/BUILD/mwccnlm
+4
-1
netware/BUILD/mwldnlm
netware/BUILD/mwldnlm
+4
-1
sql-common/client.c
sql-common/client.c
+7
-0
sql/ha_federated.cc
sql/ha_federated.cc
+22
-28
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+1
-1
tests/Makefile.am
tests/Makefile.am
+6
-0
No files found.
mysql-test/r/federated.result
View file @
420d40d3
...
...
@@ -1603,6 +1603,22 @@ fld_cid fld_name fld_parentid fld_delt
5 Torkel 0 0
DROP TABLE federated.t1;
DROP TABLE federated.bug_17377_table;
create table t1 (id int not null auto_increment primary key, val int);
create table t1
(id int not null auto_increment primary key, val int) engine=federated
connection='mysql://root@127.0.0.1:SLAVE_PORT/test/t1';
insert into t1 values (1,0),(2,0);
update t1 set val = NULL where id = 1;
select * from t1;
id val
1 NULL
2 0
select * from t1;
id val
1 NULL
2 0
drop table t1;
drop table t1;
drop table if exists federated.t1;
create table federated.t1 (a int, b int, c int);
drop table if exists federated.t1;
...
...
mysql-test/t/federated.test
View file @
420d40d3
...
...
@@ -1366,6 +1366,25 @@ drop table federated.t1, federated.t2;
connection
master
;
--
enable_parsing
#
# Bug #16494: Updates that set a column to NULL fail sometimes
#
connection
slave
;
create
table
t1
(
id
int
not
null
auto_increment
primary
key
,
val
int
);
connection
master
;
--
replace_result
$SLAVE_MYPORT
SLAVE_PORT
eval
create
table
t1
(
id
int
not
null
auto_increment
primary
key
,
val
int
)
engine
=
federated
connection
=
'mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1'
;
insert
into
t1
values
(
1
,
0
),(
2
,
0
);
update
t1
set
val
=
NULL
where
id
=
1
;
select
*
from
t1
;
connection
slave
;
select
*
from
t1
;
drop
table
t1
;
connection
master
;
drop
table
t1
;
#
# Additional test for bug#18437 "Wrong values inserted with a before
# update trigger on NDB table". SQL-layer didn't properly inform
...
...
@@ -1377,6 +1396,7 @@ connection master;
# for ON INSERT triggers only. Tests for other types of triggers reside
# in ndb_trigger.test.
#
connection
slave
;
--
disable_warnings
drop
table
if
exists
federated
.
t1
;
--
enable_warnings
...
...
netware/BUILD/mwasmnlm
View file @
420d40d3
...
...
@@ -5,4 +5,7 @@ set -e
args
=
"
$*
"
wine
--debugmsg
-all
--
mwasmnlm
$args
# NOTE: Option 'pipefail' is not standard sh
set
-o
pipefail
wine
--debugmsg
-all
--
mwasmnlm
$args
|
\
perl
-pe
's/\r//g; s/^\e.*\e(\[J|>)?//; s/[[^:print:]]//g'
netware/BUILD/mwccnlm
View file @
420d40d3
...
...
@@ -7,4 +7,7 @@ set -e
# convert it to "-I../include"
args
=
" "
`
echo
$*
|
sed
-e
's/-I.\/../-I../g'
`
wine
--debugmsg
-all
--
mwccnlm
$args
# NOTE: Option 'pipefail' is not standard sh
set
-o
pipefail
wine
--debugmsg
-all
--
mwccnlm
$args
|
\
perl
-pe
's/\r//g; s/^\e.*\e(\[J|>)?//; s/[[^:print:]]//g'
netware/BUILD/mwldnlm
View file @
420d40d3
...
...
@@ -5,4 +5,7 @@ set -e
args
=
"
$*
"
wine
--debugmsg
-all
--
mwldnlm
$args
# NOTE: Option 'pipefail' is not standard sh
set
-o
pipefail
wine
--debugmsg
-all
--
mwldnlm
$args
|
\
perl
-pe
's/\r//g; s/^\e.*\e(\[J|>)?//; s/[[^:print:]]//g'
sql-common/client.c
View file @
420d40d3
...
...
@@ -1509,6 +1509,7 @@ mysql_ssl_set(MYSQL *mysql __attribute__((unused)) ,
*/
#ifdef HAVE_OPENSSL
static
void
mysql_ssl_free
(
MYSQL
*
mysql
__attribute__
((
unused
)))
{
...
...
@@ -1533,6 +1534,7 @@ mysql_ssl_free(MYSQL *mysql __attribute__((unused)))
DBUG_VOID_RETURN
;
}
#endif
/* HAVE_OPENSSL */
/*
Return the SSL cipher (if any) used for current
...
...
@@ -1548,8 +1550,10 @@ const char * STDCALL
mysql_get_ssl_cipher
(
MYSQL
*
mysql
)
{
DBUG_ENTER
(
"mysql_get_ssl_cipher"
);
#ifdef HAVE_OPENSSL
if
(
mysql
->
net
.
vio
&&
mysql
->
net
.
vio
->
ssl_arg
)
DBUG_RETURN
(
SSL_get_cipher_name
((
SSL
*
)
mysql
->
net
.
vio
->
ssl_arg
));
#endif
/* HAVE_OPENSSL */
DBUG_RETURN
(
NULL
);
}
...
...
@@ -1568,6 +1572,9 @@ mysql_get_ssl_cipher(MYSQL *mysql)
1 Failed to validate server
*/
#ifdef HAVE_OPENSSL
static
int
ssl_verify_server_cert
(
Vio
*
vio
,
const
char
*
server_hostname
)
{
SSL
*
ssl
;
...
...
sql/ha_federated.cc
View file @
420d40d3
...
...
@@ -1775,7 +1775,7 @@ int ha_federated::repair(THD* thd, HA_CHECK_OPT* check_opt)
it.
Keep in mind that the server can do updates based on ordering if an ORDER BY
clause was used. Consecutive ordering is not guar
e
nteed.
clause was used. Consecutive ordering is not guar
a
nteed.
Currently new_data will not have an updated auto_increament record, or
and updated timestamp field. You can do these for federated by doing these:
if (table->timestamp_on_update_now)
...
...
@@ -1804,18 +1804,12 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
/*
buffers for following strings
*/
char
old_field_value_buffer
[
STRING_BUFFER_USUAL_SIZE
];
char
new_field_value_buffer
[
STRING_BUFFER_USUAL_SIZE
];
char
field_value_buffer
[
STRING_BUFFER_USUAL_SIZE
];
char
update_buffer
[
FEDERATED_QUERY_BUFFER_SIZE
];
char
where_buffer
[
FEDERATED_QUERY_BUFFER_SIZE
];
/* stores the value to be replaced of the field were are updating */
String
old_field_value
(
old_field_value_buffer
,
sizeof
(
old_field_value_buffer
),
&
my_charset_bin
);
/* stores the new value of the field */
String
new_field_value
(
new_field_value_buffer
,
sizeof
(
new_field_value_buffer
),
/* Work area for field values */
String
field_value
(
field_value_buffer
,
sizeof
(
field_value_buffer
),
&
my_charset_bin
);
/* stores the update query */
String
update_string
(
update_buffer
,
...
...
@@ -1829,8 +1823,7 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
/*
set string lengths to 0 to avoid misc chars in string
*/
old_field_value
.
length
(
0
);
new_field_value
.
length
(
0
);
field_value
.
length
(
0
);
update_string
.
length
(
0
);
where_string
.
length
(
0
);
...
...
@@ -1844,8 +1837,8 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
In this loop, we want to match column names to values being inserted
(while building INSERT statement).
Iterate through table->field (new data) and share->old_fi
le
d (old_data)
using the same index to create
d an SQL UPDATE statement, n
ew data is
Iterate through table->field (new data) and share->old_fi
el
d (old_data)
using the same index to create
an SQL UPDATE statement. N
ew data is
used to create SET field=value and old data is used to create WHERE
field=oldvalue
*/
...
...
@@ -1854,21 +1847,22 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
{
if
(
bitmap_is_set
(
table
->
write_set
,
(
*
field
)
->
field_index
))
{
update_string
.
append
((
*
field
)
->
field_name
);
update_string
.
append
(
FEDERATED_EQ
);
if
((
*
field
)
->
is_null
())
new_field_value
.
append
(
FEDERATED_NULL
);
update_string
.
append
(
FEDERATED_NULL
);
else
{
my_bitmap_map
*
old_map
=
tmp_use_all_columns
(
table
,
table
->
read_set
);
/* otherwise = */
(
*
field
)
->
val_str
(
&
new_field_value
);
(
*
field
)
->
quote_data
(
&
new_field_value
);
(
*
field
)
->
val_str
(
&
field_value
);
(
*
field
)
->
quote_data
(
&
field_value
);
update_string
.
append
(
field_value
);
field_value
.
length
(
0
);
tmp_restore_column_map
(
table
->
read_set
,
old_map
);
}
update_string
.
append
((
*
field
)
->
field_name
);
update_string
.
append
(
FEDERATED_EQ
);
update_string
.
append
(
new_field_value
);
update_string
.
append
(
FEDERATED_COMMA
);
new_field_value
.
length
(
0
);
}
if
(
bitmap_is_set
(
table
->
read_set
,
(
*
field
)
->
field_index
))
...
...
@@ -1879,11 +1873,11 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
else
{
where_string
.
append
(
FEDERATED_EQ
);
(
*
field
)
->
val_str
(
&
old_
field_value
,
(
*
field
)
->
val_str
(
&
field_value
,
(
char
*
)
(
old_data
+
(
*
field
)
->
offset
()));
(
*
field
)
->
quote_data
(
&
old_
field_value
);
where_string
.
append
(
old_
field_value
);
old_
field_value
.
length
(
0
);
(
*
field
)
->
quote_data
(
&
field_value
);
where_string
.
append
(
field_value
);
field_value
.
length
(
0
);
}
where_string
.
append
(
FEDERATED_AND
);
}
...
...
sql/item_cmpfunc.cc
View file @
420d40d3
...
...
@@ -3318,7 +3318,7 @@ longlong Item_func_regex::val_int()
}
}
null_value
=
0
;
return
my_regexec
(
&
preg
,
res
->
c_ptr
(),
0
,(
my_regmatch_t
*
)
0
,
0
)
?
0
:
1
;
return
my_regexec
(
&
preg
,
res
->
c_ptr
_safe
(),
0
,(
my_regmatch_t
*
)
0
,
0
)
?
0
:
1
;
}
...
...
tests/Makefile.am
View file @
420d40d3
...
...
@@ -50,8 +50,14 @@ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
LIBS
=
@CLIENT_LIBS@
LDADD
=
@CLIENT_EXTRA_LDFLAGS@
\
$(LIBMYSQLCLIENT_LA)
if
HAVE_NETWARE
mysql_client_test_LDADD
=
$(LDADD)
$(CXXLDFLAGS)
mysql_client_test_SOURCES
=
mysql_client_test.c
$(yassl_dummy_link_fix)
\
../mysys/my_memmem.c
else
mysql_client_test_LDADD
=
$(LDADD)
$(CXXLDFLAGS)
-L
../mysys
-lmysys
mysql_client_test_SOURCES
=
mysql_client_test.c
$(yassl_dummy_link_fix)
endif
insert_test_SOURCES
=
insert_test.c
$(yassl_dummy_link_fix)
select_test_SOURCES
=
select_test.c
$(yassl_dummy_link_fix)
insert_test_DEPENDENCIES
=
$(LIBRARIES)
$(pkglib_LTLIBRARIES)
...
...
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