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
0d22cc66
Commit
0d22cc66
authored
Jun 29, 2006
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
parents
470087cb
3ad6ad75
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
142 additions
and
53 deletions
+142
-53
config/ac-macros/compiler_flag.m4
config/ac-macros/compiler_flag.m4
+22
-0
configure.in
configure.in
+4
-0
mysql-test/r/insert_select.result
mysql-test/r/insert_select.result
+5
-0
mysql-test/r/key.result
mysql-test/r/key.result
+10
-0
mysql-test/r/view_grant.result
mysql-test/r/view_grant.result
+12
-0
mysql-test/t/insert_select.test
mysql-test/t/insert_select.test
+9
-0
mysql-test/t/key.test
mysql-test/t/key.test
+11
-0
mysql-test/t/view_grant.test
mysql-test/t/view_grant.test
+20
-0
sql/mysql_priv.h
sql/mysql_priv.h
+2
-0
sql/sql_base.cc
sql/sql_base.cc
+1
-1
sql/sql_class.cc
sql/sql_class.cc
+2
-7
sql/sql_parse.cc
sql/sql_parse.cc
+31
-18
sql/table.cc
sql/table.cc
+0
-21
strings/Makefile.am
strings/Makefile.am
+0
-6
support-files/mysql.spec.sh
support-files/mysql.spec.sh
+13
-0
No files found.
config/ac-macros/compiler_flag.m4
View file @
0d22cc66
...
...
@@ -38,3 +38,25 @@ AC_DEFUN([AC_SYS_OS_COMPILER_FLAG],
fi
])
AC_DEFUN([AC_CHECK_NOEXECSTACK],
[
AC_CACHE_CHECK(whether --noexecstack is desirable for .S files,
mysql_cv_as_noexecstack, [dnl
cat > conftest.c <<EOF
void foo (void) { }
EOF
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS
-S -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD]) \
&& grep .note.GNU-stack conftest.s >/dev/null \
&& AC_TRY_COMMAND([${CC-cc} $CCASFLAGS $CPPFLAGS -Wa,--noexecstack
-c -o conftest.o conftest.s 1>&AS_MESSAGE_LOG_FD])
then
mysql_cv_as_noexecstack=yes
else
mysql_cv_as_noexecstack=no
fi
rm -f conftest*])
if test $mysql_cv_as_noexecstack = yes; then
CCASFLAGS="$CCASFLAGS -Wa,--noexecstack"
fi
])
configure.in
View file @
0d22cc66
...
...
@@ -482,6 +482,10 @@ AM_PROG_CC_STDC
# We need an assembler, too
AM_PROG_AS
CCASFLAGS
=
"
$CCASFLAGS
$ASFLAGS
"
# Check if we need noexec stack for assembler
AC_CHECK_NOEXECSTACK
if
test
"
$am_cv_prog_cc_stdc
"
=
"no"
then
...
...
mysql-test/r/insert_select.result
View file @
0d22cc66
...
...
@@ -690,3 +690,8 @@ CREATE TABLE t1 (a int PRIMARY KEY);
INSERT INTO t1 values (1), (2);
INSERT INTO t1 SELECT a + 2 FROM t1 LIMIT 1;
DROP TABLE t1;
CREATE TABLE t1 (x int, y int);
CREATE TABLE t2 (z int, y int);
CREATE TABLE t3 (a int, b int);
INSERT INTO t3 (SELECT x, y FROM t1 JOIN t2 USING (y) WHERE z = 1);
DROP TABLE IF EXISTS t1,t2,t3;
mysql-test/r/key.result
View file @
0d22cc66
...
...
@@ -330,6 +330,16 @@ alter table t1 add key (c1,c1,c2);
ERROR 42S21: Duplicate column name 'c1'
drop table t1;
create table t1 (
i1 INT NOT NULL,
i2 INT NOT NULL,
UNIQUE i1idx (i1),
UNIQUE i2idx (i2));
desc t1;
Field Type Null Key Default Extra
i1 int(11) NO UNI
i2 int(11) NO UNI
drop table t1;
create table t1 (
c1 int,
c2 varchar(20) not null,
primary key (c1),
...
...
mysql-test/r/view_grant.result
View file @
0d22cc66
...
...
@@ -649,3 +649,15 @@ DROP VIEW mysqltest_db1.view1;
DROP TABLE mysqltest_db1.t1;
DROP SCHEMA mysqltest_db1;
DROP USER mysqltest_db1@localhost;
CREATE DATABASE test1;
CREATE DATABASE test2;
CREATE TABLE test1.t0 (a VARCHAR(20));
CREATE TABLE test2.t1 (a VARCHAR(20));
CREATE VIEW test2.t3 AS SELECT * FROM test1.t0;
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.a AS col1, tb.a AS col2 FROM test2.t3 ta, test2.t1 tb;
DROP VIEW test.v1;
DROP VIEW test2.t3;
DROP TABLE test2.t1, test1.t0;
DROP DATABASE test2;
DROP DATABASE test1;
mysql-test/t/insert_select.test
View file @
0d22cc66
...
...
@@ -238,3 +238,12 @@ INSERT INTO t1 SELECT a + 2 FROM t1 LIMIT 1;
DROP
TABLE
t1
;
# End of 4.1 tests
#
# Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
#
CREATE
TABLE
t1
(
x
int
,
y
int
);
CREATE
TABLE
t2
(
z
int
,
y
int
);
CREATE
TABLE
t3
(
a
int
,
b
int
);
INSERT
INTO
t3
(
SELECT
x
,
y
FROM
t1
JOIN
t2
USING
(
y
)
WHERE
z
=
1
);
DROP
TABLE
IF
EXISTS
t1
,
t2
,
t3
;
mysql-test/t/key.test
View file @
0d22cc66
...
...
@@ -325,6 +325,17 @@ alter table t1 add key (c1,c2,c1);
alter
table
t1
add
key
(
c1
,
c1
,
c2
);
drop
table
t1
;
#
# Bug#11228: DESC shows arbitrary column as "PRI"
#
create
table
t1
(
i1
INT
NOT
NULL
,
i2
INT
NOT
NULL
,
UNIQUE
i1idx
(
i1
),
UNIQUE
i2idx
(
i2
));
desc
t1
;
drop
table
t1
;
#
# Bug#12565 - ERROR 1034 when running simple UPDATE or DELETE
# on large MyISAM table
...
...
mysql-test/t/view_grant.test
View file @
0d22cc66
...
...
@@ -852,3 +852,23 @@ DROP VIEW mysqltest_db1.view1;
DROP
TABLE
mysqltest_db1
.
t1
;
DROP
SCHEMA
mysqltest_db1
;
DROP
USER
mysqltest_db1
@
localhost
;
#
# BUG#20482: failure on Create join view with sources views/tables
# in different schemas
#
--
disable_warnings
CREATE
DATABASE
test1
;
CREATE
DATABASE
test2
;
--
enable_warnings
CREATE
TABLE
test1
.
t0
(
a
VARCHAR
(
20
));
CREATE
TABLE
test2
.
t1
(
a
VARCHAR
(
20
));
CREATE
VIEW
test2
.
t3
AS
SELECT
*
FROM
test1
.
t0
;
CREATE
OR
REPLACE
VIEW
test
.
v1
AS
SELECT
ta
.
a
AS
col1
,
tb
.
a
AS
col2
FROM
test2
.
t3
ta
,
test2
.
t1
tb
;
DROP
VIEW
test
.
v1
;
DROP
VIEW
test2
.
t3
;
DROP
TABLE
test2
.
t1
,
test1
.
t0
;
DROP
DATABASE
test2
;
DROP
DATABASE
test1
;
sql/mysql_priv.h
View file @
0d22cc66
...
...
@@ -532,6 +532,8 @@ void cleanup_items(Item *item);
class
THD
;
void
close_thread_tables
(
THD
*
thd
,
bool
locked
=
0
,
bool
skip_derived
=
0
);
bool
check_one_table_access
(
THD
*
thd
,
ulong
privilege
,
TABLE_LIST
*
tables
);
bool
check_single_table_access
(
THD
*
thd
,
ulong
privilege
,
TABLE_LIST
*
tables
);
bool
check_routine_access
(
THD
*
thd
,
ulong
want_access
,
char
*
db
,
char
*
name
,
bool
is_proc
,
bool
no_errors
);
bool
check_some_access
(
THD
*
thd
,
ulong
want_access
,
TABLE_LIST
*
table
);
...
...
sql/sql_base.cc
View file @
0d22cc66
...
...
@@ -5471,7 +5471,7 @@ bool setup_tables_and_check_access(THD *thd,
for
(;
leaves_tmp
;
leaves_tmp
=
leaves_tmp
->
next_leaf
)
{
if
(
leaves_tmp
->
belong_to_view
&&
check_
on
e_table_access
(
thd
,
want_access
,
leaves_tmp
))
check_
singl
e_table_access
(
thd
,
want_access
,
leaves_tmp
))
{
tables
->
hide_view_error
(
thd
);
return
TRUE
;
...
...
sql/sql_class.cc
View file @
0d22cc66
...
...
@@ -1941,15 +1941,10 @@ bool select_dumpvar::send_data(List<Item> &items)
Item_func_set_user_var
*
xx
;
Item_splocal
*
yy
;
my_var
*
zz
;
DBUG_ENTER
(
"send_data"
);
if
(
unit
->
offset_limit_cnt
)
{
// using limit offset,count
unit
->
offset_limit_cnt
--
;
DBUG_RETURN
(
0
);
}
DBUG_ENTER
(
"select_dumpvar::send_data"
);
if
(
unit
->
offset_limit_cnt
)
{
// U
sing limit offset,count
{
// u
sing limit offset,count
unit
->
offset_limit_cnt
--
;
DBUG_RETURN
(
0
);
}
...
...
sql/sql_parse.cc
View file @
0d22cc66
...
...
@@ -3382,15 +3382,6 @@ mysql_execute_command(THD *thd)
&
lex
->
value_list
,
lex
->
duplicates
,
lex
->
ignore
)))
{
/*
Skip first table, which is the table we are inserting in.
Below we set context.table_list again because the call above to
mysql_insert_select_prepare() calls resolve_in_table_list_only(),
which in turn resets context.table_list and
context.first_name_resolution_table.
*/
select_lex
->
context
.
table_list
=
select_lex
->
context
.
first_name_resolution_table
=
second_table
;
res
=
handle_select
(
thd
,
lex
,
result
,
OPTION_SETUP_TABLES_DONE
);
/*
Invalidate the table in the query cache if something changed
...
...
@@ -5249,11 +5240,10 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
/*
Check grants for commands which work only with one table and all other
tables belonging to subselects or implicitly opened tables.
Check grants for commands which work only with one table.
SYNOPSIS
check_
on
e_table_access()
check_
singl
e_table_access()
thd Thread handler
privilege requested privilege
all_tables global table list of query
...
...
@@ -5263,7 +5253,8 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
1 - access denied, error is sent to client
*/
bool
check_one_table_access
(
THD
*
thd
,
ulong
privilege
,
TABLE_LIST
*
all_tables
)
bool
check_single_table_access
(
THD
*
thd
,
ulong
privilege
,
TABLE_LIST
*
all_tables
)
{
Security_context
*
backup_ctx
=
thd
->
security_ctx
;
...
...
@@ -5288,19 +5279,41 @@ bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *all_tables)
goto
deny
;
thd
->
security_ctx
=
backup_ctx
;
return
0
;
deny:
thd
->
security_ctx
=
backup_ctx
;
return
1
;
}
/*
Check grants for commands which work only with one table and all other
tables belonging to subselects or implicitly opened tables.
SYNOPSIS
check_one_table_access()
thd Thread handler
privilege requested privilege
all_tables global table list of query
RETURN
0 - OK
1 - access denied, error is sent to client
*/
bool
check_one_table_access
(
THD
*
thd
,
ulong
privilege
,
TABLE_LIST
*
all_tables
)
{
if
(
check_single_table_access
(
thd
,
privilege
,
all_tables
))
return
1
;
/* Check rights on tables of subselects and implictly opened tables */
TABLE_LIST
*
subselects_tables
;
if
((
subselects_tables
=
all_tables
->
next_global
))
{
if
((
check_table_access
(
thd
,
SELECT_ACL
,
subselects_tables
,
0
)))
goto
deny
;
return
1
;
}
return
0
;
deny:
thd
->
security_ctx
=
backup_ctx
;
return
1
;
}
...
...
sql/table.cc
View file @
0d22cc66
...
...
@@ -1025,27 +1025,6 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
if
(
share
->
key_info
[
key
].
flags
&
HA_FULLTEXT
)
share
->
key_info
[
key
].
algorithm
=
HA_KEY_ALG_FULLTEXT
;
if
(
primary_key
>=
MAX_KEY
&&
(
keyinfo
->
flags
&
HA_NOSAME
))
{
/*
If the UNIQUE key doesn't have NULL columns and is not a part key
declare this as a primary key.
*/
primary_key
=
key
;
for
(
i
=
0
;
i
<
keyinfo
->
key_parts
;
i
++
)
{
uint
fieldnr
=
key_part
[
i
].
fieldnr
;
if
(
!
fieldnr
||
share
->
field
[
fieldnr
-
1
]
->
null_ptr
||
share
->
field
[
fieldnr
-
1
]
->
key_length
()
!=
key_part
[
i
].
length
)
{
primary_key
=
MAX_KEY
;
// Can't be used
break
;
}
}
}
for
(
i
=
0
;
i
<
keyinfo
->
key_parts
;
key_part
++
,
i
++
)
{
Field
*
field
;
...
...
strings/Makefile.am
View file @
0d22cc66
...
...
@@ -67,12 +67,6 @@ conf_to_src_LDFLAGS= @NOINST_LDFLAGS@
#strtoull.o: @CHARSET_OBJS@
if
ASSEMBLER
# On Linux gcc can compile the assembly files
%.o
:
%.s
$(AS)
$(ASFLAGS)
-o
$@
$<
endif
FLAGS
=
$(DEFS)
$(INCLUDES)
$(CPPFLAGS)
$(CFLAGS)
@NOINST_LDFLAGS@
str_test
:
str_test.c $(pkglib_LIBRARIES)
...
...
support-files/mysql.spec.sh
View file @
0d22cc66
...
...
@@ -148,6 +148,19 @@ They should be used with caution.
%
{
see_base
}
%package bench
Requires: %
{
name
}
-client
perl-DBI perl
Summary: MySQL - Benchmarks and
test
system
Group: Applications/Databases
Provides: mysql-bench
Obsoletes: mysql-bench
AutoReqProv: no
%description bench
This package contains MySQL benchmark scripts and data.
%
{
see_base
}
%package devel
Summary: MySQL - Development header files and libraries
Group: Applications/Databases
...
...
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