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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a54df74a
Commit
a54df74a
authored
Oct 16, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes after last merge.
Ignore changed keyblocks when on does DELETE FROM table_name;
parent
26b1bbdb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
46 deletions
+49
-46
acinclude.m4
acinclude.m4
+6
-1
myisam/mi_delete_all.c
myisam/mi_delete_all.c
+5
-0
mysql-test/r/null_key.result
mysql-test/r/null_key.result
+34
-1
sql/ha_innodb.cc
sql/ha_innodb.cc
+0
-40
sql/sql_parse.cc
sql/sql_parse.cc
+4
-4
No files found.
acinclude.m4
View file @
a54df74a
...
...
@@ -746,7 +746,12 @@ AC_MSG_CHECKING(for OpenSSL)
AC_DEFINE(HAVE_VIO)
AC_MSG_RESULT(yes)
openssl_libs="-L$OPENSSL_LIB -lssl -lcrypto"
openssl_includes="-I$OPENSSL_INCLUDE"
# Don't set openssl_includes to /usr/include as this gives us a lot of
# compiler warnings when using gcc 3.x
if test "$OPENSSL_INCLUDE" != "/usr/include"
then
openssl_includes="-I$OPENSSL_INCLUDE"
fi
AC_DEFINE(HAVE_OPENSSL)
# openssl-devel-0.9.6 requires dlopen() and we can't link staticly
...
...
myisam/mi_delete_all.c
View file @
a54df74a
...
...
@@ -52,6 +52,11 @@ int mi_delete_all_rows(MI_INFO *info)
VOID
(
_mi_writeinfo
(
info
,
WRITEINFO_UPDATE_KEYFILE
));
if
(
my_chsize
(
info
->
dfile
,
0
,
0
,
MYF
(
MY_WME
)))
goto
err
;
/*
If we are using delayed keys or if the user has done changes to the tables
since it was locked then there may be key blocks in the key cache
*/
flush_key_blocks
(
share
->
kfile
,
FLUSH_IGNORE_CHANGED
);
allow_break
();
/* Allow SIGHUP & SIGINT */
DBUG_RETURN
(
0
);
...
...
mysql-test/r/null_key.result
View file @
a54df74a
...
...
@@ -188,10 +188,43 @@ id uniq_id
4 2
7 3
8 4
DROP table t1,t2;
CREATE TABLE `t1` (
`order_id` char(32) NOT NULL default '',
`product_id` char(32) NOT NULL default '',
`product_type` int(11) NOT NULL default '0',
PRIMARY KEY (`order_id`,`product_id`,`product_type`)
) TYPE=MyISAM;
CREATE TABLE `t2` (
`order_id` char(32) NOT NULL default '',
`product_id` char(32) NOT NULL default '',
`product_type` int(11) NOT NULL default '0',
PRIMARY KEY (`order_id`,`product_id`,`product_type`)
) TYPE=MyISAM;
INSERT INTO t1 (order_id, product_id, product_type) VALUES
('3d7ce39b5d4b3e3d22aaafe9b633de51',1206029, 3),
('3d7ce39b5d4b3e3d22aaafe9b633de51',5880836, 3),
('9d9aad7764b5b2c53004348ef8d34500',2315652, 3);
INSERT INTO t2 (order_id, product_id, product_type) VALUES
('9d9aad7764b5b2c53004348ef8d34500',2315652, 3);
select t1.* from t1
left join t2 using(order_id, product_id, product_type)
where t2.order_id=NULL;
order_id product_id product_type
select t1.* from t1
left join t2 using(order_id, product_id, product_type)
where t2.order_id is NULL;
order_id product_id product_type
3d7ce39b5d4b3e3d22aaafe9b633de51 1206029 3
3d7ce39b5d4b3e3d22aaafe9b633de51 5880836 3
drop table t1,t2;
create table t1 (id int);
insert into t1 values (null), (0);
create table t2 (id int);
insert into t2 values (null);
select * from t1, t2 where t1.id = t2.id;
id id
alter table t1 add key id (id);
select * from t1, t2 where t1.id = t2.id;
id id
DROP
table t1,t2;
drop
table t1,t2;
sql/ha_innodb.cc
View file @
a54df74a
...
...
@@ -3640,46 +3640,6 @@ ha_innobase::reset(void)
}
/**********************************************************************
When we create a temporary table inside MySQL LOCK TABLES, MySQL will
not call external_lock for the temporary table when it uses it. Instead,
it will call this function. */
int
ha_innobase
::
start_stmt
(
/*====================*/
/* out: 0 or error code */
THD
*
thd
)
/* in: handle to the user thread */
{
row_prebuilt_t
*
prebuilt
=
(
row_prebuilt_t
*
)
innobase_prebuilt
;
trx_t
*
trx
;
update_thd
(
thd
);
trx
=
prebuilt
->
trx
;
innobase_release_stat_resources
(
trx
);
trx_mark_sql_stat_end
(
trx
);
auto_inc_counter_for_this_stat
=
0
;
prebuilt
->
sql_stat_start
=
TRUE
;
prebuilt
->
hint_no_need_to_fetch_extra_cols
=
TRUE
;
prebuilt
->
read_just_key
=
0
;
if
(
prebuilt
->
select_lock_type
==
LOCK_NONE
)
{
/* This handle is for a temporary table created inside
this same LOCK TABLES; since MySQL does NOT call external_lock
in this case, we must use x-row locks inside InnoDB to be
prepared for an update of a row */
prebuilt
->
select_lock_type
=
LOCK_X
;
}
thd
->
transaction
.
all
.
innodb_active_trans
=
1
;
return
(
0
);
}
/**********************************************************************
When we create a temporary table inside MySQL LOCK TABLES, MySQL will
not call external_lock for the temporary table when it uses it. Instead,
...
...
sql/sql_parse.cc
View file @
a54df74a
...
...
@@ -3356,10 +3356,10 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables)
}
if
(
options
&
REFRESH_LOG
)
{
mysql_log
.
new_file
(
0
);
mysql_update_log
.
new_file
(
0
);
mysql_bin_log
.
new_file
(
0
);
mysql_slow_log
.
new_file
(
0
);
mysql_log
.
new_file
(
1
);
mysql_update_log
.
new_file
(
1
);
mysql_bin_log
.
new_file
(
1
);
mysql_slow_log
.
new_file
(
1
);
if
(
ha_flush_logs
())
result
=
1
;
}
...
...
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