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
a8d230c6
Commit
a8d230c6
authored
Jul 18, 2006
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge moonbone.local:/work/mysql-4.1
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
parents
f04ea135
4be51e16
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
3 deletions
+48
-3
client/mysql.cc
client/mysql.cc
+1
-1
mysql-test/r/date_formats.result
mysql-test/r/date_formats.result
+6
-0
mysql-test/r/mysql_client.result
mysql-test/r/mysql_client.result
+4
-0
mysql-test/t/date_formats.test
mysql-test/t/date_formats.test
+7
-1
mysql-test/t/mysql_client.test
mysql-test/t/mysql_client.test
+29
-0
sql/time.cc
sql/time.cc
+1
-1
No files found.
client/mysql.cc
View file @
a8d230c6
...
@@ -1052,7 +1052,7 @@ static int read_lines(bool execute_commands)
...
@@ -1052,7 +1052,7 @@ static int read_lines(bool execute_commands)
(We want to allow help, print and clear anywhere at line start
(We want to allow help, print and clear anywhere at line start
*/
*/
if
(
execute_commands
&&
(
named_cmds
||
glob_buffer
.
is_empty
())
if
(
execute_commands
&&
(
named_cmds
||
glob_buffer
.
is_empty
())
&&
!
in_string
&&
(
com
=
find_command
(
line
,
0
)))
&&
!
ml_comment
&&
!
in_string
&&
(
com
=
find_command
(
line
,
0
)))
{
{
if
((
*
com
->
func
)(
&
glob_buffer
,
line
)
>
0
)
if
((
*
com
->
func
)(
&
glob_buffer
,
line
)
>
0
)
break
;
break
;
...
...
mysql-test/r/date_formats.result
View file @
a8d230c6
...
@@ -525,3 +525,9 @@ TIME_FORMAT("24:00:00", '%l %p')
...
@@ -525,3 +525,9 @@ TIME_FORMAT("24:00:00", '%l %p')
SELECT TIME_FORMAT("25:00:00", '%l %p');
SELECT TIME_FORMAT("25:00:00", '%l %p');
TIME_FORMAT("25:00:00", '%l %p')
TIME_FORMAT("25:00:00", '%l %p')
1 AM
1 AM
SELECT DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896);
DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896)
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '%Y-%m-%d %H:%i:%s'
"End of 4.1 tests"
mysql-test/r/mysql_client.result
0 → 100644
View file @
a8d230c6
1
1
ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
ERROR at line 1: USE must be followed by a database name
mysql-test/t/date_formats.test
View file @
a8d230c6
...
@@ -289,7 +289,6 @@ drop table t1;
...
@@ -289,7 +289,6 @@ drop table t1;
select
str_to_date
(
1
,
NULL
);
select
str_to_date
(
1
,
NULL
);
select
str_to_date
(
NULL
,
1
);
select
str_to_date
(
NULL
,
1
);
select
str_to_date
(
1
,
IF
(
1
=
1
,
NULL
,
NULL
)
);
select
str_to_date
(
1
,
IF
(
1
=
1
,
NULL
,
NULL
)
);
# End of 4.1 tests
#
#
# Bug#11326
# Bug#11326
...
@@ -312,3 +311,10 @@ SELECT TIME_FORMAT("12:00:00", '%l %p');
...
@@ -312,3 +311,10 @@ SELECT TIME_FORMAT("12:00:00", '%l %p');
SELECT
TIME_FORMAT
(
"23:00:00"
,
'%l %p'
);
SELECT
TIME_FORMAT
(
"23:00:00"
,
'%l %p'
);
SELECT
TIME_FORMAT
(
"24:00:00"
,
'%l %p'
);
SELECT
TIME_FORMAT
(
"24:00:00"
,
'%l %p'
);
SELECT
TIME_FORMAT
(
"25:00:00"
,
'%l %p'
);
SELECT
TIME_FORMAT
(
"25:00:00"
,
'%l %p'
);
#
# Bug#20729: Bad date_format() call makes mysql server crash
#
SELECT
DATE_FORMAT
(
'%Y-%m-%d %H:%i:%s'
,
1151414896
);
--
echo
"End of 4.1 tests"
mysql-test/t/mysql_client.test
0 → 100644
View file @
a8d230c6
# This test should work in embedded server after we fix mysqltest
--
source
include
/
not_embedded
.
inc
#
# Bug #20432: mysql client interprets commands in comments
#
# if the client sees the 'use' within the comment, we haven't fixed
--
exec
echo
"/*"
>
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
--
exec
echo
"use"
>>
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
--
exec
echo
"*/"
>>
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
--
exec
$MYSQL
<
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
2
>&
1
# SQL can have embedded comments => workie
--
exec
echo
"select /*"
>
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
--
exec
echo
"use"
>>
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
--
exec
echo
"*/ 1"
>>
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
--
exec
$MYSQL
<
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
2
>&
1
# client commands on the other hand must be at BOL => error
--
exec
echo
"/*"
>
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
--
exec
echo
"xxx"
>>
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
--
exec
echo
"*/ use"
>>
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
--
error
1
--
exec
$MYSQL
<
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
2
>&
1
# client comment recognized, but parameter missing => error
--
exec
echo
"use"
>
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
--
exec
$MYSQL
<
$MYSQLTEST_VARDIR
/
tmp
/
bug20432
.
sql
2
>&
1
sql/time.cc
View file @
a8d230c6
...
@@ -797,7 +797,7 @@ void make_truncated_value_warning(THD *thd, const char *str_val,
...
@@ -797,7 +797,7 @@ void make_truncated_value_warning(THD *thd, const char *str_val,
}
}
sprintf
(
warn_buff
,
ER
(
ER_TRUNCATED_WRONG_VALUE
),
sprintf
(
warn_buff
,
ER
(
ER_TRUNCATED_WRONG_VALUE
),
type_str
,
str
.
ptr
());
type_str
,
str
.
ptr
());
push_warning
_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_TRUNCATED_WRONG_VALUE
,
warn_buff
);
ER_TRUNCATED_WRONG_VALUE
,
warn_buff
);
}
}
...
...
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