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
35aaf222
Commit
35aaf222
authored
Dec 11, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getting rid of now() is tests
parent
41f9594d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+1
-1
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+1
-1
No files found.
mysql-test/r/func_str.result
View file @
35aaf222
...
...
@@ -686,7 +686,7 @@ select left(1234, 3) + 0;
left(1234, 3) + 0
123
create table t1 (a int not null primary key, b varchar(40), c datetime);
insert into t1 (a,b,c) values (1,'Tom',
now()),(2,'ball games',now()), (3,'Basil',now()), (4,'Dean',now()),(5,'Ellis',now()), (6,'Serg',now()), (7,'Sergei',now()),(8,'Georg',now()),(9,'Salle',now()),(10,'Sinisa',now()
);
insert into t1 (a,b,c) values (1,'Tom',
'2004-12-10 12:13:14'),(2,'ball games','2004-12-10 12:13:14'), (3,'Basil','2004-12-10 12:13:14'), (4,'Dean','2004-12-10 12:13:14'),(5,'Ellis','2004-12-10 12:13:14'), (6,'Serg','2004-12-10 12:13:14'), (7,'Sergei','2004-12-10 12:13:14'),(8,'Georg','2004-12-10 12:13:14'),(9,'Salle','2004-12-10 12:13:14'),(10,'Sinisa','2004-12-10 12:13:14'
);
select count(*) as total, left(c,10) as reg from t1 group by reg order by reg desc limit 0,12;
total reg
10 2004-12-10
...
...
mysql-test/t/func_str.test
View file @
35aaf222
...
...
@@ -426,6 +426,6 @@ select left(1234, 3) + 0;
# Bug #7101: bug with LEFT() when used as a field in GROUP BY aggregation
#
create
table
t1
(
a
int
not
null
primary
key
,
b
varchar
(
40
),
c
datetime
);
insert
into
t1
(
a
,
b
,
c
)
values
(
1
,
'Tom'
,
now
()),(
2
,
'ball games'
,
now
()),
(
3
,
'Basil'
,
now
()),
(
4
,
'Dean'
,
now
()),(
5
,
'Ellis'
,
now
()),
(
6
,
'Serg'
,
now
()),
(
7
,
'Sergei'
,
now
()),(
8
,
'Georg'
,
now
()),(
9
,
'Salle'
,
now
()),(
10
,
'Sinisa'
,
now
()
);
insert
into
t1
(
a
,
b
,
c
)
values
(
1
,
'Tom'
,
'2004-12-10 12:13:14'
),(
2
,
'ball games'
,
'2004-12-10 12:13:14'
),
(
3
,
'Basil'
,
'2004-12-10 12:13:14'
),
(
4
,
'Dean'
,
'2004-12-10 12:13:14'
),(
5
,
'Ellis'
,
'2004-12-10 12:13:14'
),
(
6
,
'Serg'
,
'2004-12-10 12:13:14'
),
(
7
,
'Sergei'
,
'2004-12-10 12:13:14'
),(
8
,
'Georg'
,
'2004-12-10 12:13:14'
),(
9
,
'Salle'
,
'2004-12-10 12:13:14'
),(
10
,
'Sinisa'
,
'2004-12-10 12:13:14'
);
select
count
(
*
)
as
total
,
left
(
c
,
10
)
as
reg
from
t1
group
by
reg
order
by
reg
desc
limit
0
,
12
;
drop
table
t1
;
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