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
94008df3
Commit
94008df3
authored
Apr 23, 2007
by
joerg@debian.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge debian.(none):/M51/mysql-5.1
into debian.(none):/M51/push-5.1
parents
7855ae51
bcaa5cc7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
91 additions
and
81 deletions
+91
-81
configure.in
configure.in
+71
-22
include/Makefile.am
include/Makefile.am
+2
-2
mysql-test/r/truncate.result
mysql-test/r/truncate.result
+3
-23
mysql-test/t/truncate.test
mysql-test/t/truncate.test
+8
-23
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+4
-4
sql/sql_delete.cc
sql/sql_delete.cc
+3
-6
sql/sql_lex.cc
sql/sql_lex.cc
+0
-1
No files found.
configure.in
View file @
94008df3
...
@@ -421,6 +421,22 @@ AC_SUBST(PERL5)
...
@@ -421,6 +421,22 @@ AC_SUBST(PERL5)
# icheck, used for ABI check
# icheck, used for ABI check
AC_PATH_PROG
(
ICHECK, icheck, no
)
AC_PATH_PROG
(
ICHECK, icheck, no
)
# "icheck" is also the name of a file system check program on Tru64.
# Verify the program found is really the interface checker.
if
test
"x
$ICHECK
"
!=
"xno"
then
AC_MSG_CHECKING
(
if
$ICHECK
works as expected
)
echo
"int foo;"
>
conftest.h
$ICHECK
--canonify
-o
conftest.ic conftest.h 2>/dev/null
if
test
-f
"conftest.ic"
then
AC_MSG_RESULT
(
yes
)
else
AC_MSG_RESULT
(
no
)
ICHECK
=
no
fi
rm
-f
conftest.ic conftest.h
fi
AC_SUBST
(
ICHECK
)
AC_SUBST
(
ICHECK
)
# Lock for PS
# Lock for PS
...
@@ -2299,28 +2315,6 @@ AC_ARG_WITH(man,
...
@@ -2299,28 +2315,6 @@ AC_ARG_WITH(man,
[
with_man
=
yes
]
[
with_man
=
yes
]
)
)
if
test
X
"
$with_man
"
=
Xyes
then
man_dirs
=
"man"
if
test
X
"
$have_ndbcluster
"
=
Xyes
then
man1_files
=
`
ls
$srcdir
/man/
*
.1 |
sed
-e
's;^.*man/;;'
`
man8_files
=
`
ls
$srcdir
/man/
*
.8 |
sed
-e
's;^.*man/;;'
`
else
man1_files
=
`
ls
$srcdir
/man/
*
.1 |
grep
-v
'/ndb'
|
sed
-e
's;^.*man/;;'
`
man8_files
=
`
ls
$srcdir
/man/
*
.8 |
grep
-v
'/ndb'
|
sed
-e
's;^.*man/;;'
`
fi
man1_files
=
`
echo
$man1_files
`
man8_files
=
`
echo
$man8_files
`
else
man_dirs
=
""
man1_files
=
""
man8_files
=
""
fi
AC_SUBST
(
man_dirs
)
AC_SUBST
(
man1_files
)
AC_SUBST
(
man8_files
)
# Don't build readline, i have it already
# Don't build readline, i have it already
AC_ARG_WITH
(
readline,
AC_ARG_WITH
(
readline,
[
--without-readline
Use system readline instead of bundled copy.],
[
--without-readline
Use system readline instead of bundled copy.],
...
@@ -2447,6 +2441,61 @@ AC_SUBST(readline_link)
...
@@ -2447,6 +2441,61 @@ AC_SUBST(readline_link)
AC_SUBST
(
readline_h_ln_cmd
)
AC_SUBST
(
readline_h_ln_cmd
)
# Include man pages, if desired, adapted to the configured parts.
if
test
X
"
$with_man
"
=
Xyes
then
# First, create the list of all man pages present.
MANLISTFIL
=
manlist.
$$
TMPLISTFIL
=
`
echo
$MANLISTFIL
|
sed
-e
's/manlist/tmplist/'
`
if
test
-f
$MANLISTFIL
-o
-f
$TMPLISTFIL
then
echo
"Temp file '
$MANLISTFIL
' or '
$TMPLISTFIL
' already exists in '
`
pwd
`
' - aborting"
exit
1
fi
touch
$MANLISTFIL
$TMPLISTFIL
ls
$srcdir
/man/
*
.[[18]]
>
$MANLISTFIL
# Then, remove all those pages from the list which are specific to parts
# (table handlers, features, ...) which are not configured in this run.
AC_MSG_CHECKING
(
"for man pages to remove"
)
MAN_DROP
=
"dropping"
if
test
X
"
$with_plugin_ndbcluster
"
!=
Xyes
then
MAN_DROP
=
"
$MAN_DROP
ndbcluster"
grep
-v
'/ndb'
$MANLISTFIL
>
$TMPLISTFIL
;
mv
-f
$TMPLISTFIL
$MANLISTFIL
fi
if
test
X
"
$with_embedded_server
"
!=
Xyes
then
MAN_DROP
=
"
$MAN_DROP
embedded"
grep
-v
'embedded'
$MANLISTFIL
>
$TMPLISTFIL
;
mv
-f
$TMPLISTFIL
$MANLISTFIL
fi
if
test
X
"
$with_plugin_innobase
"
!=
Xyes
then
MAN_DROP
=
"
$MAN_DROP
innodb"
grep
-v
'inno'
$MANLISTFIL
>
$TMPLISTFIL
;
mv
-f
$TMPLISTFIL
$MANLISTFIL
fi
AC_MSG_RESULT
([
$MAN_DROP
])
# Finally, split the man pages into sections 1 and 8.
# Get rid of line breaks.
man1_files
=
`
sed
-n
-e
'/\.1$/s/^.*man\///p'
<
$MANLISTFIL
`
man8_files
=
`
sed
-n
-e
'/\.8$/s/^.*man\///p'
<
$MANLISTFIL
`
man_dirs
=
"man"
man1_files
=
`
echo
$man1_files
`
man8_files
=
`
echo
$man8_files
`
rm
-f
$MANLISTFIL
$TMPLISTFIL
else
man_dirs
=
""
man1_files
=
""
man8_files
=
""
fi
AC_SUBST
(
man_dirs
)
AC_SUBST
(
man1_files
)
AC_SUBST
(
man8_files
)
# If we have threads generate some library functions and test programs
# If we have threads generate some library functions and test programs
sql_server_dirs
=
sql_server_dirs
=
sql_server
=
sql_server
=
...
...
include/Makefile.am
View file @
94008df3
...
@@ -23,7 +23,7 @@ HEADERS_ABI = mysql.h mysql_com.h mysql_time.h \
...
@@ -23,7 +23,7 @@ HEADERS_ABI = mysql.h mysql_com.h mysql_time.h \
pkginclude_HEADERS
=
$(HEADERS_ABI)
my_dbug.h m_string.h my_sys.h
\
pkginclude_HEADERS
=
$(HEADERS_ABI)
my_dbug.h m_string.h my_sys.h
\
my_xml.h mysql_embed.h
\
my_xml.h mysql_embed.h
\
my_pthread.h my_no_pthread.h
\
my_pthread.h my_no_pthread.h
\
errmsg.h my_global.h my_net.h
\
decimal.h
errmsg.h my_global.h my_net.h
\
my_getopt.h sslopt-longopts.h my_dir.h
\
my_getopt.h sslopt-longopts.h my_dir.h
\
sslopt-vars.h sslopt-case.h sql_common.h keycache.h
\
sslopt-vars.h sslopt-case.h sql_common.h keycache.h
\
m_ctype.h mysql/plugin.h
$(HEADERS_GEN)
m_ctype.h mysql/plugin.h
$(HEADERS_GEN)
...
@@ -34,7 +34,7 @@ noinst_HEADERS = config-win.h config-netware.h \
...
@@ -34,7 +34,7 @@ noinst_HEADERS = config-win.h config-netware.h \
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h
\
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h
\
my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h
\
my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h
\
thr_lock.h t_ctype.h violite.h md5.h base64.h
\
thr_lock.h t_ctype.h violite.h md5.h base64.h
\
mysql_version.h.in my_handler.h my_time.h
decimal.h
\
mysql_version.h.in my_handler.h my_time.h
\
my_vle.h my_user.h my_atomic.h atomic/nolock.h
\
my_vle.h my_user.h my_atomic.h atomic/nolock.h
\
atomic/rwlock.h atomic/x86-gcc.h atomic/x86-msvc.h
\
atomic/rwlock.h atomic/x86-gcc.h atomic/x86-msvc.h
\
my_libwrap.h
my_libwrap.h
...
...
mysql-test/r/truncate.result
View file @
94008df3
...
@@ -57,26 +57,6 @@ create table t1 (s1 int);
...
@@ -57,26 +57,6 @@ create table t1 (s1 int);
insert into t1 (s1) values (1), (2), (3), (4), (5);
insert into t1 (s1) values (1), (2), (3), (4), (5);
create view v1 as select * from t1;
create view v1 as select * from t1;
truncate table v1;
truncate table v1;
select count(*) from t1;
ERROR 42S02: Table 'test.v1' doesn't exist
count(*)
drop view v1;
0
drop table t1;
insert into t1 (s1) values (1), (2), (3), (4), (5);
create view v2 as select * from t1 where s1 > 3;
truncate table v2;
select * from t1;
s1
1
2
3
select * from v2;
s1
delete from t1;
create table t2 (s1 int, s2 int);
create view v3 as select a.s1, b.s2 from t1 a join t2 b on a.s1 = b.s1 where a.s1 > 3;
truncate table v3;
ERROR HY000: Can not delete from join view 'test.v3'
create view v4 as select * from t1 limit 1,1;
truncate table v4;
ERROR HY000: The target table v4 of the TRUNCATE is not updatable
drop view v1, v2, v3, v4;
drop table t1, t2;
mysql-test/t/truncate.test
View file @
94008df3
...
@@ -54,33 +54,18 @@ drop table t1;
...
@@ -54,33 +54,18 @@ drop table t1;
# End of 4.1 tests
# End of 4.1 tests
# Test for Bug#5507 "TRUNCATE should work with views"
# Test for Bug#5507 "TRUNCATE should work with views"
#
# when it'll be fixed, the error should become 1347
# (test.v1' is not BASE TABLE)
#
create
table
t1
(
s1
int
);
create
table
t1
(
s1
int
);
insert
into
t1
(
s1
)
values
(
1
),
(
2
),
(
3
),
(
4
),
(
5
);
insert
into
t1
(
s1
)
values
(
1
),
(
2
),
(
3
),
(
4
),
(
5
);
create
view
v1
as
select
*
from
t1
;
create
view
v1
as
select
*
from
t1
;
--
error
1146
truncate
table
v1
;
truncate
table
v1
;
select
count
(
*
)
from
t1
;
drop
view
v1
;
drop
table
t1
;
insert
into
t1
(
s1
)
values
(
1
),
(
2
),
(
3
),
(
4
),
(
5
);
create
view
v2
as
select
*
from
t1
where
s1
>
3
;
truncate
table
v2
;
select
*
from
t1
;
select
*
from
v2
;
delete
from
t1
;
# The following should fail
create
table
t2
(
s1
int
,
s2
int
);
create
view
v3
as
select
a
.
s1
,
b
.
s2
from
t1
a
join
t2
b
on
a
.
s1
=
b
.
s1
where
a
.
s1
>
3
;
--
error
1395
truncate
table
v3
;
# The following should fail
create
view
v4
as
select
*
from
t1
limit
1
,
1
;
--
error
1288
truncate
table
v4
;
drop
view
v1
,
v2
,
v3
,
v4
;
drop
table
t1
,
t2
;
# End of 5.0 tests
# End of 5.0 tests
sql/ha_ndbcluster.cc
View file @
94008df3
...
@@ -738,8 +738,8 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field,
...
@@ -738,8 +738,8 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field,
DBUG_DUMP
(
"value"
,
(
char
*
)
&
bits
,
pack_len
);
DBUG_DUMP
(
"value"
,
(
char
*
)
&
bits
,
pack_len
);
#ifdef WORDS_BIGENDIAN
#ifdef WORDS_BIGENDIAN
/* store lsw first */
/* store lsw first */
bits
=
((
bits
>>
32
)
&
0x00000000FFFFFFFF
)
bits
=
((
bits
>>
32
)
&
0x00000000FFFFFFFF
LL
)
|
((
bits
<<
32
)
&
0xFFFFFFFF00000000
);
|
((
bits
<<
32
)
&
0xFFFFFFFF00000000
LL
);
#endif
#endif
DBUG_RETURN
(
ndb_op
->
setValue
(
fieldnr
,
(
char
*
)
&
bits
)
!=
0
);
DBUG_RETURN
(
ndb_op
->
setValue
(
fieldnr
,
(
char
*
)
&
bits
)
!=
0
);
}
}
...
@@ -3222,10 +3222,10 @@ void ndb_unpack_record(TABLE *table, NdbValue *value,
...
@@ -3222,10 +3222,10 @@ void ndb_unpack_record(TABLE *table, NdbValue *value,
/* lsw is stored first */
/* lsw is stored first */
Uint32
*
buf
=
(
Uint32
*
)(
*
value
).
rec
->
aRef
();
Uint32
*
buf
=
(
Uint32
*
)(
*
value
).
rec
->
aRef
();
field_bit
->
Field_bit
::
store
((((
longlong
)
*
buf
)
field_bit
->
Field_bit
::
store
((((
longlong
)
*
buf
)
&
0x000000000FFFFFFFF
)
&
0x000000000FFFFFFFF
LL
)
|
|
((((
longlong
)
*
(
buf
+
1
))
<<
32
)
((((
longlong
)
*
(
buf
+
1
))
<<
32
)
&
0xFFFFFFFF00000000
),
&
0xFFFFFFFF00000000
LL
),
TRUE
);
TRUE
);
#else
#else
field_bit
->
Field_bit
::
store
((
longlong
)
field_bit
->
Field_bit
::
store
((
longlong
)
...
...
sql/sql_delete.cc
View file @
94008df3
...
@@ -394,8 +394,6 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
...
@@ -394,8 +394,6 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
{
{
Item
*
fake_conds
=
0
;
Item
*
fake_conds
=
0
;
SELECT_LEX
*
select_lex
=
&
thd
->
lex
->
select_lex
;
SELECT_LEX
*
select_lex
=
&
thd
->
lex
->
select_lex
;
const
char
*
operation
=
thd
->
lex
->
sql_command
==
SQLCOM_TRUNCATE
?
"TRUNCATE"
:
"DELETE"
;
DBUG_ENTER
(
"mysql_prepare_delete"
);
DBUG_ENTER
(
"mysql_prepare_delete"
);
List
<
Item
>
all_fields
;
List
<
Item
>
all_fields
;
...
@@ -410,14 +408,14 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
...
@@ -410,14 +408,14 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
if
(
!
table_list
->
updatable
||
check_key_in_view
(
thd
,
table_list
))
if
(
!
table_list
->
updatable
||
check_key_in_view
(
thd
,
table_list
))
{
{
my_error
(
ER_NON_UPDATABLE_TABLE
,
MYF
(
0
),
table_list
->
alias
,
operation
);
my_error
(
ER_NON_UPDATABLE_TABLE
,
MYF
(
0
),
table_list
->
alias
,
"DELETE"
);
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
}
}
{
{
TABLE_LIST
*
duplicate
;
TABLE_LIST
*
duplicate
;
if
((
duplicate
=
unique_table
(
thd
,
table_list
,
table_list
->
next_global
,
0
)))
if
((
duplicate
=
unique_table
(
thd
,
table_list
,
table_list
->
next_global
,
0
)))
{
{
update_non_unique_table_error
(
table_list
,
operation
,
duplicate
);
update_non_unique_table_error
(
table_list
,
"DELETE"
,
duplicate
);
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
}
}
}
}
...
@@ -935,8 +933,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
...
@@ -935,8 +933,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
if
(
!
dont_send_ok
)
if
(
!
dont_send_ok
)
{
{
enum
legacy_db_type
table_type
;
enum
legacy_db_type
table_type
;
if
(
mysql_frm_type
(
thd
,
path
,
&
table_type
)
==
FRMTYPE_VIEW
)
mysql_frm_type
(
thd
,
path
,
&
table_type
);
goto
trunc_by_del
;
if
(
table_type
==
DB_TYPE_UNKNOWN
)
if
(
table_type
==
DB_TYPE_UNKNOWN
)
{
{
my_error
(
ER_NO_SUCH_TABLE
,
MYF
(
0
),
my_error
(
ER_NO_SUCH_TABLE
,
MYF
(
0
),
...
...
sql/sql_lex.cc
View file @
94008df3
...
@@ -1835,7 +1835,6 @@ bool st_lex::can_use_merged()
...
@@ -1835,7 +1835,6 @@ bool st_lex::can_use_merged()
case
SQLCOM_UPDATE_MULTI
:
case
SQLCOM_UPDATE_MULTI
:
case
SQLCOM_DELETE
:
case
SQLCOM_DELETE
:
case
SQLCOM_DELETE_MULTI
:
case
SQLCOM_DELETE_MULTI
:
case
SQLCOM_TRUNCATE
:
case
SQLCOM_INSERT
:
case
SQLCOM_INSERT
:
case
SQLCOM_INSERT_SELECT
:
case
SQLCOM_INSERT_SELECT
:
case
SQLCOM_REPLACE
:
case
SQLCOM_REPLACE
:
...
...
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