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[] {
3030 const cols = r . COLUMNS ? r . COLUMNS . split ( "," ) : [ ] ;
3131 return {
3232 name : r . INDEX_NAME ,
33- type : getIndexType ( cols , r . NON_UNIQUES === "1" ) ,
33+ type : getIndexType ( cols , r . NON_UNIQUES === 1 ) ,
3434 comment : r . COMMENTS ,
3535 columns : cols . map ( c => {
3636 return { name : c } ;
Original file line number Diff line number Diff line change @@ -512,7 +512,10 @@ async function getTableInfoWithQR(
512512 args . tableName ,
513513 `${ args . databaseName } /${ args . refName } ` ,
514514 ] ) ;
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+ ] ) ;
516519 return {
517520 tableName : args . tableName ,
518521 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
2525 GROUP_CONCAT(non_unique) AS NON_UNIQUES,
2626 GROUP_CONCAT(column_name ORDER BY seq_in_index) AS COLUMNS
2727FROM information_schema.statistics
28- WHERE table_name=? AND index_name!="PRIMARY"
28+ WHERE table_name=? AND table_schema=? AND index_name!="PRIMARY"
2929GROUP BY index_name;` ;
3030
3131export const tableColsQuery = `SHOW FULL TABLES WHERE table_type = 'BASE TABLE'` ;
You can’t perform that action at this time.
0 commit comments