1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

find_files(): don't sort files in my_dir(), sort table names

after all engines have discovered their tables
  
side effect: correct alphabetical sorting as in ORDER BY ... COLLATE utf8_bin,
information_schema is no longer the first after find_files(),
tables like #mysql50#zzz are sorted first (as per table name),
not last (as per file name zzz).
This commit is contained in:
Sergei Golubchik
2013-04-07 17:17:25 +02:00
parent 8980e67693
commit 2a9662b401
11 changed files with 50 additions and 64 deletions

View File

@ -142,9 +142,9 @@ create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ERROR 42000: Incorrect table name '#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12345'
show tables;
Tables_in_mysqltestbug26703
#mysql50#abc`def
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1234
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#mysql50#abc`def
use test;
drop database mysqltestbug26703;
End of 5.1 tests

View File

@ -176,15 +176,15 @@ t1
v1
show tables;
Tables_in_test
t1
#mysql50#v-1
t1
v1
test.t1 OK
show tables;
Tables_in_test
t1
v1
v-1
v1
drop view v1, `v-1`;
drop table t1;
SET NAMES utf8;

View File

@ -234,8 +234,8 @@ test
# 'bug58090' database should be present.
SHOW DATABASES;
Database
information_schema
bug58090
information_schema
mtr
mysql
performance_schema

View File

@ -5,8 +5,8 @@ Database Create Database
foo CREATE DATABASE `foo` /*!40100 DEFAULT CHARACTER SET latin1 */
show schemas;
Database
information_schema
foo
information_schema
mtr
mysql
performance_schema

View File

@ -33,12 +33,12 @@ show create database `#mysql50#mysqltest-1`;
ERROR 42000: Unknown database '#mysql50#mysqltest-1'
show tables in `mysqltest1`;
Tables_in_mysqltest1
t1
t-1
t1
show tables in `mysqltest-1`;
Tables_in_mysqltest-1
t1
t-1
t1
drop database `mysqltest1`;
drop database `mysqltest-1`;
drop table if exists `txu@0023p@0023p1`;

View File

@ -9,12 +9,12 @@ CREATE DATABASE `
SELECT schema_name from information_schema.schemata where schema_name <> 'mtr';
schema_name
information_schema
<EFBFBD>\<5C>\<5C>\
<EFBFBD><EFBFBD><EFBFBD>{<7B><>
<EFBFBD><EFBFBD>ݺ<EFBFBD>
mysql
performance_schema
test
<EFBFBD>\<5C>\<5C>\
<EFBFBD><EFBFBD><EFBFBD>{<7B><>
<EFBFBD><EFBFBD>ݺ<EFBFBD>
USE `<60><>ݺ<EFBFBD>`;
USE `<60><><EFBFBD>{<7B><>`;
USE `<60>\<5C>\<5C>\`;

View File

@ -10,12 +10,12 @@ CREATE DATABASE `
SELECT schema_name from information_schema.schemata where schema_name <> 'mtr';
schema_name
information_schema
<EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD>
<EFBFBD><EFBFBD>܏<EFBFBD>ݏ<EFBFBD><EFBFBD>
<EFBFBD>ƎΎݎ<EFBFBD><EFBFBD><EFBFBD>
mysql
performance_schema
test
<EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD>
<EFBFBD><EFBFBD>܏<EFBFBD>ݏ<EFBFBD><EFBFBD>
<EFBFBD>ƎΎݎ<EFBFBD><EFBFBD><EFBFBD>
USE `<60>ƎΎݎ<CE8E><DD8E><EFBFBD>`;
USE `<60><><EFBFBD>ܸ<EFBFBD>`;
USE `<60><>܏<EFBFBD>ݏ<EFBFBD><DD8F>`;

View File

@ -9,12 +9,12 @@ CREATE DATABASE `
SELECT schema_name from information_schema.schemata where schema_name <> 'mtr';
schema_name
information_schema
<EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD>
<EFBFBD><EFBFBD>܏<EFBFBD>ݏ<EFBFBD><EFBFBD>
<EFBFBD>ƎΎݎ<EFBFBD><EFBFBD><EFBFBD>
mysql
performance_schema
test
<EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD>
<EFBFBD><EFBFBD>܏<EFBFBD>ݏ<EFBFBD><EFBFBD>
<EFBFBD>ƎΎݎ<EFBFBD><EFBFBD><EFBFBD>
USE `<60>ƎΎݎ<CE8E><DD8E><EFBFBD>`;
USE `<60><><EFBFBD>ܸ<EFBFBD>`;
USE `<60><>܏<EFBFBD>ݏ<EFBFBD><DD8F>`;

View File

@ -9,12 +9,12 @@ CREATE DATABASE `龔龖龗`;
SELECT schema_name from information_schema.schemata where schema_name <> 'mtr';
schema_name
information_schema
日本語
龔龖龗
ニホンゴ
mysql
performance_schema
test
日本語
龔龖龗
ニホンゴ
USE `ニホンゴ`;
USE `日本語`;
USE `龔龖龗`;

View File

@ -6,8 +6,8 @@ e,lost+found,.mysqlgui,ignored_db
# with '.'
SHOW DATABASES;
Database
information_schema
#mysql50#.otherdir
information_schema
mtr
mysql
performance_schema
@ -33,8 +33,8 @@ id
2
SHOW DATABASES;
Database
information_schema
#mysql50#.otherdir
information_schema
lost+found
mtr
mysql