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
88ba26e1
Commit
88ba26e1
authored
Feb 08, 2006
by
reggie@linux.site
Browse files
Options
Browse Files
Download
Plain Diff
Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into linux.site:/home/reggie/work/mysql-5.1
parents
e74b6098
0831fd61
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
125 additions
and
7 deletions
+125
-7
mysql-test/r/binlog_row_blackhole.result
mysql-test/r/binlog_row_blackhole.result
+1
-1
mysql-test/r/federated.result
mysql-test/r/federated.result
+42
-0
mysql-test/r/rpl_row_flsh_tbls.result
mysql-test/r/rpl_row_flsh_tbls.result
+1
-0
mysql-test/r/rpl_row_log.result
mysql-test/r/rpl_row_log.result
+1
-1
mysql-test/t/federated.test
mysql-test/t/federated.test
+30
-0
sql/field.cc
sql/field.cc
+4
-1
sql/ha_federated.cc
sql/ha_federated.cc
+30
-0
sql/ha_federated.h
sql/ha_federated.h
+1
-0
sql/handler.h
sql/handler.h
+1
-1
sql/sql_trigger.cc
sql/sql_trigger.cc
+1
-1
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+13
-2
No files found.
mysql-test/r/binlog_row_blackhole.result
View file @
88ba26e1
...
...
@@ -92,7 +92,7 @@ insert into t1 values(1);
insert ignore into t1 values(1);
replace into t1 values(100);
create table t2 (a varchar(200)) engine=blackhole;
load data infile '../
../std_data
/words.dat' into table t2;
load data infile '../
std_data_ln
/words.dat' into table t2;
alter table t1 add b int;
alter table t1 drop b;
create table t3 like t1;
...
...
mysql-test/r/federated.result
View file @
88ba26e1
...
...
@@ -1517,6 +1517,48 @@ bitty
drop table federated.t1;
drop table federated.t1;
DROP TABLE IF EXISTS federated.t1;
Warnings:
Note 1051 Unknown table 't1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment,
PRIMARY KEY (`id`));
DROP TABLE IF EXISTS federated.t1;
Warnings:
Note 1051 Unknown table 't1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment,
PRIMARY KEY (`id`)
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:9308/federated/t1';
INSERT INTO federated.t1 VALUES ();
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
1
INSERT INTO federated.t1 VALUES ();
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
2
INSERT INTO federated.t1 VALUES ();
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
3
INSERT INTO federated.t1 VALUES ();
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
4
INSERT INTO federated.t1 VALUES ();
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
5
SELECT * FROM federated.t1;
id
1
2
3
4
5
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
mysql-test/r/rpl_row_flsh_tbls.result
View file @
88ba26e1
...
...
@@ -30,3 +30,4 @@ flush tables with read lock;
start slave;
stop slave;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
drop table t3, t4, t5;
mysql-test/r/rpl_row_log.result
View file @
88ba26e1
...
...
@@ -12,7 +12,7 @@ create table t1(n int not null auto_increment primary key);
insert into t1 values (NULL);
drop table t1;
create table t1 (word char(20) not null);
load data infile '../
../std_data
/words.dat' into table t1 ignore 1 lines;
load data infile '../
std_data_ln
/words.dat' into table t1 ignore 1 lines;
select count(*) from t1;
count(*)
69
...
...
mysql-test/t/federated.test
View file @
88ba26e1
...
...
@@ -1226,4 +1226,34 @@ drop table federated.t1;
connection
slave
;
drop
table
federated
.
t1
;
#
# BUG# 14768 test auto_increment last_insert_id()
#
connection
slave
;
DROP
TABLE
IF
EXISTS
federated
.
t1
;
CREATE
TABLE
federated
.
t1
(
`id`
int
(
20
)
NOT
NULL
auto_increment
,
PRIMARY
KEY
(
`id`
));
connection
master
;
DROP
TABLE
IF
EXISTS
federated
.
t1
;
eval
CREATE
TABLE
federated
.
t1
(
`id`
int
(
20
)
NOT
NULL
auto_increment
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
"FEDERATED"
DEFAULT
CHARSET
=
latin1
CONNECTION
=
'mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'
;
INSERT
INTO
federated
.
t1
VALUES
();
SELECT
LAST_INSERT_ID
();
INSERT
INTO
federated
.
t1
VALUES
();
SELECT
LAST_INSERT_ID
();
INSERT
INTO
federated
.
t1
VALUES
();
SELECT
LAST_INSERT_ID
();
INSERT
INTO
federated
.
t1
VALUES
();
SELECT
LAST_INSERT_ID
();
INSERT
INTO
federated
.
t1
VALUES
();
SELECT
LAST_INSERT_ID
();
SELECT
*
FROM
federated
.
t1
;
source
include
/
federated_cleanup
.
inc
;
sql/field.cc
View file @
88ba26e1
...
...
@@ -5243,7 +5243,7 @@ int Field_date::store(double nr)
else
tmp
=
(
longlong
)
rint
(
nr
);
return
Field_date
::
store
(
tmp
);
return
Field_date
::
store
(
tmp
,
TRUE
);
}
...
...
@@ -5265,6 +5265,9 @@ int Field_date::store(longlong nr, bool unsigned_val)
error
=
2
;
}
if
(
nr
>=
19000000000000.0
&&
nr
<=
99991231235959.0
)
nr
=
floor
(
nr
/
1000000.0
);
// Timestamp to date
if
(
error
)
set_datetime_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
error
==
2
?
ER_WARN_DATA_OUT_OF_RANGE
:
...
...
sql/ha_federated.cc
View file @
88ba26e1
...
...
@@ -1409,6 +1409,12 @@ static int free_share(FEDERATED_SHARE *share)
hash_delete
(
&
federated_open_tables
,
(
byte
*
)
share
);
my_free
((
gptr
)
share
->
scheme
,
MYF
(
MY_ALLOW_ZERO_PTR
));
share
->
scheme
=
0
;
if
(
share
->
socket
)
{
my_free
((
gptr
)
share
->
socket
,
MYF
(
MY_ALLOW_ZERO_PTR
));
share
->
socket
=
0
;
}
thr_lock_delete
(
&
share
->
lock
);
VOID
(
pthread_mutex_destroy
(
&
share
->
mutex
));
my_free
((
gptr
)
share
,
MYF
(
0
));
...
...
@@ -1688,10 +1694,34 @@ int ha_federated::write_row(byte *buf)
{
DBUG_RETURN
(
stash_remote_error
());
}
/*
If the table we've just written a record to contains an auto_increment field,
then store the last_insert_id() value from the foreign server
*/
if
(
table
->
next_number_field
)
update_auto_increment
();
DBUG_RETURN
(
0
);
}
/*
ha_federated::update_auto_increment
This method ensures that last_insert_id() works properly. What it simply does
is calls last_insert_id() on the foreign database immediately after insert
(if the table has an auto_increment field) and sets the insert id via
thd->insert_id(ID) (as well as storing thd->prev_insert_id)
*/
void
ha_federated
::
update_auto_increment
(
void
)
{
THD
*
thd
=
current_thd
;
DBUG_ENTER
(
"ha_federated::update_auto_increment"
);
thd
->
insert_id
(
mysql
->
last_used_con
->
insert_id
);
DBUG_PRINT
(
"info"
,(
"last_insert_id %d"
,
auto_increment_value
));
DBUG_VOID_RETURN
;
}
int
ha_federated
::
optimize
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
)
{
...
...
sql/ha_federated.h
View file @
88ba26e1
...
...
@@ -286,6 +286,7 @@ class ha_federated: public handler
void
position
(
const
byte
*
record
);
//required
void
info
(
uint
);
//required
void
update_auto_increment
(
void
);
int
repair
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
int
optimize
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
...
...
sql/handler.h
View file @
88ba26e1
...
...
@@ -2030,7 +2030,7 @@ int ha_binlog_end(THD *thd);
#define ha_reset_logs(a) 0
#define ha_binlog_index_purge_file(a,b) 0
#define ha_reset_slave(a)
#define ha_binlog_log_query(a,b,c,d,e,f);
#define ha_binlog_log_query(a,b,c,d,e,f
,g
);
#define ha_binlog_wait(a)
#define ha_binlog_end(a) 0
#endif
sql/sql_trigger.cc
View file @
88ba26e1
...
...
@@ -1183,7 +1183,7 @@ bool Table_triggers_list::process_triggers(THD *thd, trg_event_type event,
my_error
(
ER_TABLEACCESS_DENIED_ERROR
,
MYF
(
0
),
priv_desc
,
thd
->
security_ctx
->
priv_user
,
thd
->
security_ctx
->
host_or_ip
,
table
->
s
->
table_name
);
table
->
s
->
table_name
.
str
);
sp_restore_security_context
(
thd
,
save_ctx
);
return
TRUE
;
...
...
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
88ba26e1
...
...
@@ -370,7 +370,6 @@ void AsyncFile::openReq(Request* request)
const
int
mode
=
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
|
S_IROTH
|
S_IWOTH
;
retry:
if
(
flags
&
FsOpenReq
::
OM_CREATE_IF_NONE
){
if
((
theFd
=
::
open
(
theFileName
.
c_str
(),
new_flags
,
mode
))
!=
-
1
)
{
close
(
theFd
);
...
...
@@ -449,9 +448,21 @@ void AsyncFile::openReq(Request* request)
}
if
(
size
!=
0
)
{
int
err
=
errno
;
#ifdef O_DIRECT
if
((
new_flags
&
O_DIRECT
)
&&
off
==
0
)
{
ndbout_c
(
"error on first write(%d), disable O_DIRECT"
,
err
);
new_flags
&=
~
O_DIRECT
;
close
(
theFd
);
theFd
=
::
open
(
theFileName
.
c_str
(),
new_flags
,
mode
);
if
(
theFd
!=
-
1
)
continue
;
}
#endif
close
(
theFd
);
unlink
(
theFileName
.
c_str
());
request
->
error
=
err
no
;
request
->
error
=
err
;
return
;
}
off
+=
request
->
par
.
open
.
page_size
;
...
...
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