File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export function fromDoltRowsRes(rows: RawRow[]): Index[] {
30
30
const cols = r . COLUMNS ? r . COLUMNS . split ( "," ) : [ ] ;
31
31
return {
32
32
name : r . INDEX_NAME ,
33
- type : getIndexType ( cols , r . NON_UNIQUES === "1" ) ,
33
+ type : getIndexType ( cols , r . NON_UNIQUES === 1 ) ,
34
34
comment : r . COMMENTS ,
35
35
columns : cols . map ( c => {
36
36
return { name : c } ;
Original file line number Diff line number Diff line change @@ -512,7 +512,10 @@ async function getTableInfoWithQR(
512
512
args . tableName ,
513
513
`${ args . databaseName } /${ args . refName } ` ,
514
514
] ) ;
515
- const idxRows = await query ( qh . indexQuery , [ args . tableName ] ) ;
515
+ const idxRows = await query ( qh . indexQuery , [
516
+ args . tableName ,
517
+ `${ args . databaseName } /${ args . refName } ` ,
518
+ ] ) ;
516
519
return {
517
520
tableName : args . tableName ,
518
521
columns : columns . map ( c => column . fromDoltRowRes ( c , args . tableName ) ) ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export const indexQuery = `SELECT
25
25
GROUP_CONCAT(non_unique) AS NON_UNIQUES,
26
26
GROUP_CONCAT(column_name ORDER BY seq_in_index) AS COLUMNS
27
27
FROM information_schema.statistics
28
- WHERE table_name=? AND index_name!="PRIMARY"
28
+ WHERE table_name=? AND table_schema=? AND index_name!="PRIMARY"
29
29
GROUP BY index_name;` ;
30
30
31
31
export const tableColsQuery = `SHOW FULL TABLES WHERE table_type = 'BASE TABLE'` ;
You can’t perform that action at this time.
0 commit comments