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
5ef85e02
Commit
5ef85e02
authored
Aug 03, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1-ndb
parents
f8820128
9fac49b2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
29 deletions
+50
-29
Build-tools/Do-compile
Build-tools/Do-compile
+3
-1
mysql-test/r/join.result
mysql-test/r/join.result
+6
-0
mysql-test/t/join.test
mysql-test/t/join.test
+10
-0
sql-common/my_time.c
sql-common/my_time.c
+5
-5
sql/sql_acl.cc
sql/sql_acl.cc
+1
-1
sql/sql_base.cc
sql/sql_base.cc
+25
-22
No files found.
Build-tools/Do-compile
View file @
5ef85e02
...
...
@@ -10,12 +10,13 @@ use Sys::Hostname;
$opt_distribution
=
$opt_user
=
$opt_config_env
=
$opt_config_extra_env
=
"";
$opt_dbd_options
=
$opt_perl_options
=
$opt_config_options
=
$opt_make_options
=
$opt_suffix
=
"";
$opt_tmp
=
$opt_version_suffix
=
"";
$opt_help
=
$opt_delete
=
$opt_debug
=
$opt_stage
=
$opt_no_test
=
$opt_no_perl
=
$opt_with_low_memory
=
$opt_fast_benchmark
=
$opt_static_client
=
$opt_static_server
=
$opt_static_perl
=
$opt_sur
=
$opt_with_small_disk
=
$opt_local_perl
=
$opt_tcpip
=
$opt_build_thread
=
$opt_use_old_distribution
=
$opt_enable_shared
=
$opt_no_crash_me
=
$opt_no_strip
=
$opt_with_cluster
=
$opt_with_debug
=
$opt_no_benchmark
=
$opt_no_mysqltest
=
$opt_without_embedded
=
$opt_readline
=
0
;
$opt_
bundled_zlib
=
$opt_
help
=
$opt_delete
=
$opt_debug
=
$opt_stage
=
$opt_no_test
=
$opt_no_perl
=
$opt_with_low_memory
=
$opt_fast_benchmark
=
$opt_static_client
=
$opt_static_server
=
$opt_static_perl
=
$opt_sur
=
$opt_with_small_disk
=
$opt_local_perl
=
$opt_tcpip
=
$opt_build_thread
=
$opt_use_old_distribution
=
$opt_enable_shared
=
$opt_no_crash_me
=
$opt_no_strip
=
$opt_with_cluster
=
$opt_with_debug
=
$opt_no_benchmark
=
$opt_no_mysqltest
=
$opt_without_embedded
=
$opt_readline
=
0
;
$opt_innodb
=
$opt_bdb
=
$opt_raid
=
$opt_libwrap
=
$opt_clearlogs
=
0
;
GetOptions
(
"
bdb
",
"
build-thread=i
",
"
bundled-zlib
",
"
config-env=s
"
=>
\
@config_env
,
"
config-extra-env=s
"
=>
\
@config_extra_env
,
"
config-options=s
"
=>
\
@config_options
,
...
...
@@ -255,6 +256,7 @@ if ($opt_stage <= 1)
log_system
("
$make
clean
")
if
(
$opt_use_old_distribution
);
$opt_config_options
.=
"
--disable-shared
"
if
(
!
$opt_enable_shared
);
# Default for binary versions
$opt_config_options
.=
"
--with-berkeley-db
"
if
(
$opt_bdb
);
$opt_config_options
.=
"
--with-zlib-dir=bundled
"
if
(
$opt_bundled_zlib
);
$opt_config_options
.=
"
--with-client-ldflags=-all-static
"
if
(
$opt_static_client
);
$opt_config_options
.=
"
--with-debug
"
if
(
$opt_with_debug
);
$opt_config_options
.=
"
--with-libwrap
"
if
(
$opt_libwrap
);
...
...
mysql-test/r/join.result
View file @
5ef85e02
...
...
@@ -283,6 +283,12 @@ ID Value1 Value2
SELECT * FROM t1 NATURAL JOIN t2 WHERE (Value1 = 'A' AND Value2 <> 'B') AND 1;
ID Value1 Value2
drop table t1,t2;
CREATE TABLE t1 (a int);
CREATE TABLE t2 (b int);
CREATE TABLE t3 (c int);
SELECT * FROM t1 NATURAL JOIN t2 NATURAL JOIN t3;
a b c
DROP TABLE t1, t2, t3;
create table t1 (i int);
create table t2 (i int);
create table t3 (i int);
...
...
mysql-test/t/join.test
View file @
5ef85e02
...
...
@@ -284,6 +284,16 @@ SELECT * FROM t1 NATURAL JOIN t2 WHERE 1 AND Value1 = 'A' AND Value2 <> 'B';
SELECT
*
FROM
t1
NATURAL
JOIN
t2
WHERE
(
Value1
=
'A'
AND
Value2
<>
'B'
)
AND
1
;
drop
table
t1
,
t2
;
#
# dummy natural join (no common columns) Bug #4807
#
CREATE
TABLE
t1
(
a
int
);
CREATE
TABLE
t2
(
b
int
);
CREATE
TABLE
t3
(
c
int
);
SELECT
*
FROM
t1
NATURAL
JOIN
t2
NATURAL
JOIN
t3
;
DROP
TABLE
t1
,
t2
,
t3
;
#
# Test combination of join methods
#
...
...
sql-common/my_time.c
View file @
5ef85e02
...
...
@@ -680,12 +680,12 @@ my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap)
/* Get difference in days */
int
days
=
t
->
day
-
l_time
->
tm_mday
;
if
(
days
<
-
1
)
days
=
1
;
/
/ Month has wrapped
days
=
1
;
/
* Month has wrapped */
else
if
(
days
>
1
)
days
=
-
1
;
diff
=
(
3600L
*
(
long
)
(
days
*
24
+
((
int
)
t
->
hour
-
(
int
)
l_time
->
tm_hour
))
+
(
long
)
(
60
*
((
int
)
t
->
minute
-
(
int
)
l_time
->
tm_min
)));
current_timezone
+=
diff
+
3600
;
/
/ Compensate for -3600 above
current_timezone
+=
diff
+
3600
;
/
* Compensate for -3600 above */
tmp
+=
(
time_t
)
diff
;
localtime_r
(
&
tmp
,
&
tm_tmp
);
l_time
=&
tm_tmp
;
...
...
@@ -698,15 +698,15 @@ my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap)
{
int
days
=
t
->
day
-
l_time
->
tm_mday
;
if
(
days
<
-
1
)
days
=
1
;
/
/ Month has wrapped
days
=
1
;
/
* Month has wrapped */
else
if
(
days
>
1
)
days
=
-
1
;
diff
=
(
3600L
*
(
long
)
(
days
*
24
+
((
int
)
t
->
hour
-
(
int
)
l_time
->
tm_hour
))
+
(
long
)
(
60
*
((
int
)
t
->
minute
-
(
int
)
l_time
->
tm_min
)));
if
(
diff
==
3600
)
tmp
+=
3600
-
t
->
minute
*
60
-
t
->
second
;
/
/ Move to next hour
tmp
+=
3600
-
t
->
minute
*
60
-
t
->
second
;
/
* Move to next hour */
else
if
(
diff
==
-
3600
)
tmp
-=
t
->
minute
*
60
+
t
->
second
;
/
/ Move to previous hour
tmp
-=
t
->
minute
*
60
+
t
->
second
;
/
* Move to previous hour */
*
in_dst_time_gap
=
1
;
}
...
...
sql/sql_acl.cc
View file @
5ef85e02
...
...
@@ -1149,7 +1149,7 @@ bool check_change_password(THD *thd, const char *host, const char *user,
return
(
1
);
}
uint
len
=
strlen
(
new_password
);
if
(
len
!=
SCRAMBLED_PASSWORD_CHAR_LENGTH
&&
if
(
len
&&
len
!=
SCRAMBLED_PASSWORD_CHAR_LENGTH
&&
len
!=
SCRAMBLED_PASSWORD_CHAR_LENGTH_323
)
{
net_printf
(
thd
,
0
,
...
...
sql/sql_base.cc
View file @
5ef85e02
...
...
@@ -2522,29 +2522,32 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds)
// to prevent natural join processing during PS re-execution
table
->
natural_join
=
0
;
if
(
!
table
->
outer_join
)
// Not left join
if
(
cond_and
->
list
.
elements
)
{
*
conds
=
and_conds
(
*
conds
,
cond_and
);
// fix_fields() should be made with temporary memory pool
if
(
stmt
)
thd
->
restore_backup_item_arena
(
stmt
,
&
backup
);
if
(
*
conds
&&
!
(
*
conds
)
->
fixed
)
{
if
((
*
conds
)
->
fix_fields
(
thd
,
tables
,
conds
))
DBUG_RETURN
(
1
);
}
}
else
{
table
->
on_expr
=
and_conds
(
table
->
on_expr
,
cond_and
);
// fix_fields() should be made with temporary memory pool
if
(
stmt
)
thd
->
restore_backup_item_arena
(
stmt
,
&
backup
);
if
(
table
->
on_expr
&&
!
table
->
on_expr
->
fixed
)
{
if
(
table
->
on_expr
->
fix_fields
(
thd
,
tables
,
&
table
->
on_expr
))
DBUG_RETURN
(
1
);
}
if
(
!
table
->
outer_join
)
// Not left join
{
*
conds
=
and_conds
(
*
conds
,
cond_and
);
// fix_fields() should be made with temporary memory pool
if
(
stmt
)
thd
->
restore_backup_item_arena
(
stmt
,
&
backup
);
if
(
*
conds
&&
!
(
*
conds
)
->
fixed
)
{
if
((
*
conds
)
->
fix_fields
(
thd
,
tables
,
conds
))
DBUG_RETURN
(
1
);
}
}
else
{
table
->
on_expr
=
and_conds
(
table
->
on_expr
,
cond_and
);
// fix_fields() should be made with temporary memory pool
if
(
stmt
)
thd
->
restore_backup_item_arena
(
stmt
,
&
backup
);
if
(
table
->
on_expr
&&
!
table
->
on_expr
->
fixed
)
{
if
(
table
->
on_expr
->
fix_fields
(
thd
,
tables
,
&
table
->
on_expr
))
DBUG_RETURN
(
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