mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Cleanups
mysql-test/t/distinct.test: Cleanup sql/log.cc: Cleanup sql/slave.cc: Cleanup sql/sql_delete.cc: Cleanup sql/sql_parse.cc: Simple optimization
This commit is contained in:
@ -273,11 +273,14 @@ CREATE TABLE t2 (a int primary key, b int, c int);
|
||||
INSERT t2 VALUES (3,4,5);
|
||||
SELECT DISTINCT t1.a, t2.b FROM t1, t2 WHERE t1.a=1 ORDER BY t2.c;
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
|
||||
#
|
||||
# Test of LEFT() with distinct
|
||||
#
|
||||
|
||||
CREATE table t1 ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) NOT NULL default '', PRIMARY KEY (`id`)) TYPE=MyISAM AUTO_INCREMENT=3 ;
|
||||
INSERT INTO t1 VALUES (1, 'aaaaa');
|
||||
INSERT INTO t1 VALUES (3, 'aaaaa');
|
||||
INSERT INTO t1 VALUES (2, 'eeeeeee');
|
||||
select distinct left(name,1) as name from t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user