I have a table which contains the following values, with an index on the path column. When I select values ordered by path it uses the index, but ignores any digits past the third. See below.
What I am getting:
category_id name path
1091 Bagels and Donuts 114.1091 (1 is ignored)
1092 Barbecue 114.1092 (2 is ignored)
115 Afghan Restaurant 114.113
1140 International 114.1140 (0 is ignored)
116 African Restaurant 114.116
117 Ethiopian Restaurant 114.116.117
118 American Restaurant 114.118
119 New American Restaurant 114.118.119
120 Asian Restaurant 114.120
What I should be getting:
category_id name path
115 Afghan Restaurant 114.113
116 African Restaurant 114.116
117 Ethiopian Restaurant 114.116.117
118 American Restaurant 114.118
119 New American Restaurant 114.118.119
120 Asian Restaurant 114.120
1091 Bagels and Donuts 114.1091
1092 Barbecue 114.1092
1140 International 114.1140
Any thoughts?