Loading client/completion_hash.cc +2 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,8 @@ int completion_hash_update(HashTable *ht, char *arKey, uint nKeyLength, if (!memcmp(p->arKey, arKey, nKeyLength)) { entry *n; n = (entry *) alloc_root(&ht->mem_root,sizeof(entry)); if (!(n = (entry *) alloc_root(&ht->mem_root,sizeof(entry)))) return FAILURE; n->pNext = p->pData; n->str = str; p->pData = n; Loading client/mysql.cc +6 −3 Original line number Diff line number Diff line Loading @@ -1502,7 +1502,10 @@ You can turn off this feature to get a quicker startup with -A\n\n"); if (!(field_names[i] = (char **) alloc_root(&hash_mem_root, sizeof(char *) * (num_fields*2+1)))) { mysql_free_result(fields); break; } field_names[i][num_fields*2]= '\0'; j=0; while ((sql_field=mysql_fetch_field(fields))) Loading Loading @@ -2077,10 +2080,10 @@ print_table_data_html(MYSQL_RES *result) } while ((cur = mysql_fetch_row(result))) { ulong *lengths=mysql_fetch_lengths(result); (void) tee_fputs("<TR>", PAGER); for (uint i=0; i < mysql_num_fields(result); i++) { ulong *lengths=mysql_fetch_lengths(result); (void) tee_fputs("<TD>", PAGER); safe_put_field(cur[i],lengths[i]); (void) tee_fputs("</TD>", PAGER); Loading @@ -2106,10 +2109,10 @@ print_table_data_xml(MYSQL_RES *result) fields = mysql_fetch_fields(result); while ((cur = mysql_fetch_row(result))) { ulong *lengths=mysql_fetch_lengths(result); (void) tee_fputs("\n <row>\n", PAGER); for (uint i=0; i < mysql_num_fields(result); i++) { ulong *lengths=mysql_fetch_lengths(result); tee_fprintf(PAGER, "\t<%s>", (fields[i].name ? (fields[i].name[0] ? fields[i].name : " ") : "NULL")); Loading cmd-line-utils/libedit/makelist.sh +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ case $FLAG in # -fh) cat $FILES | $AWK '/el_action_t/ { print $3 }' | \ sort | tr '[a-z]' '[A-Z]' | $AWK ' sort | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | $AWK ' BEGIN { printf("/* Automatically generated file, do not edit */\n"); printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n"); Loading cmd-line-utils/libedit/parse.c +2 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,8 @@ parse_line(EditLine *el, const char *line) int argc; Tokenizer *tok; tok = tok_init(NULL); if (!(tok = tok_init(NULL))) return -1; tok_line(tok, line, &argc, &argv); argc = el_parse(el, argc, argv); tok_end(tok); Loading mysql-test/r/ndb_index_ordered.result +110 −0 Original line number Diff line number Diff line Loading @@ -310,3 +310,113 @@ SubscrID SbclID 3 NULL drop table test1; drop table test2; create table t1 ( pk int primary key, dt datetime not null, da date not null, ye year not null, ti time not null, ts timestamp not null, index(dt), index(da), index(ye), index(ti), index(ts) ) engine=ndb; insert into t1 (pk,dt,da,ye,ti) values (1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59'), (2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59'), (3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00'), (4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00'), (5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06'), (6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06'), (7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10'), (8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11'), (9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59'); select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; count(*)-9 0 select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00'; count(*)-6 0 select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00'; count(*)-5 0 select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22'; count(*)-5 0 select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11'; count(*)-7 0 select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11'; count(*)-8 0 select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00'; count(*)-9 0 select count(*)-9 from t1 use index (da) where da > '1900-01-01'; count(*)-9 0 select count(*)-6 from t1 use index (da) where da >= '1955-12-31'; count(*)-6 0 select count(*)-5 from t1 use index (da) where da > '1955-12-31'; count(*)-5 0 select count(*)-5 from t1 use index (da) where da < '1970-03-03'; count(*)-5 0 select count(*)-6 from t1 use index (da) where da < '2001-01-01'; count(*)-6 0 select count(*)-8 from t1 use index (da) where da <= '2001-01-02'; count(*)-8 0 select count(*)-9 from t1 use index (da) where da <= '2055-01-01'; count(*)-9 0 select count(*)-9 from t1 use index (ye) where ye > '1900'; count(*)-9 0 select count(*)-6 from t1 use index (ye) where ye >= '1955'; count(*)-6 0 select count(*)-5 from t1 use index (ye) where ye > '1955'; count(*)-5 0 select count(*)-5 from t1 use index (ye) where ye < '1970'; count(*)-5 0 select count(*)-6 from t1 use index (ye) where ye < '2001'; count(*)-6 0 select count(*)-8 from t1 use index (ye) where ye <= '2001'; count(*)-8 0 select count(*)-9 from t1 use index (ye) where ye <= '2055'; count(*)-9 0 select count(*)-9 from t1 use index (ti) where ti >= '00:00:00'; count(*)-9 0 select count(*)-7 from t1 use index (ti) where ti > '00:00:00'; count(*)-7 0 select count(*)-7 from t1 use index (ti) where ti > '05:05:05'; count(*)-7 0 select count(*)-5 from t1 use index (ti) where ti > '06:06:06'; count(*)-5 0 select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; count(*)-5 0 select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; count(*)-6 0 select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; count(*)-8 0 select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; count(*)-9 0 Loading
client/completion_hash.cc +2 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,8 @@ int completion_hash_update(HashTable *ht, char *arKey, uint nKeyLength, if (!memcmp(p->arKey, arKey, nKeyLength)) { entry *n; n = (entry *) alloc_root(&ht->mem_root,sizeof(entry)); if (!(n = (entry *) alloc_root(&ht->mem_root,sizeof(entry)))) return FAILURE; n->pNext = p->pData; n->str = str; p->pData = n; Loading
client/mysql.cc +6 −3 Original line number Diff line number Diff line Loading @@ -1502,7 +1502,10 @@ You can turn off this feature to get a quicker startup with -A\n\n"); if (!(field_names[i] = (char **) alloc_root(&hash_mem_root, sizeof(char *) * (num_fields*2+1)))) { mysql_free_result(fields); break; } field_names[i][num_fields*2]= '\0'; j=0; while ((sql_field=mysql_fetch_field(fields))) Loading Loading @@ -2077,10 +2080,10 @@ print_table_data_html(MYSQL_RES *result) } while ((cur = mysql_fetch_row(result))) { ulong *lengths=mysql_fetch_lengths(result); (void) tee_fputs("<TR>", PAGER); for (uint i=0; i < mysql_num_fields(result); i++) { ulong *lengths=mysql_fetch_lengths(result); (void) tee_fputs("<TD>", PAGER); safe_put_field(cur[i],lengths[i]); (void) tee_fputs("</TD>", PAGER); Loading @@ -2106,10 +2109,10 @@ print_table_data_xml(MYSQL_RES *result) fields = mysql_fetch_fields(result); while ((cur = mysql_fetch_row(result))) { ulong *lengths=mysql_fetch_lengths(result); (void) tee_fputs("\n <row>\n", PAGER); for (uint i=0; i < mysql_num_fields(result); i++) { ulong *lengths=mysql_fetch_lengths(result); tee_fprintf(PAGER, "\t<%s>", (fields[i].name ? (fields[i].name[0] ? fields[i].name : " ") : "NULL")); Loading
cmd-line-utils/libedit/makelist.sh +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ case $FLAG in # -fh) cat $FILES | $AWK '/el_action_t/ { print $3 }' | \ sort | tr '[a-z]' '[A-Z]' | $AWK ' sort | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | $AWK ' BEGIN { printf("/* Automatically generated file, do not edit */\n"); printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n"); Loading
cmd-line-utils/libedit/parse.c +2 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,8 @@ parse_line(EditLine *el, const char *line) int argc; Tokenizer *tok; tok = tok_init(NULL); if (!(tok = tok_init(NULL))) return -1; tok_line(tok, line, &argc, &argv); argc = el_parse(el, argc, argv); tok_end(tok); Loading
mysql-test/r/ndb_index_ordered.result +110 −0 Original line number Diff line number Diff line Loading @@ -310,3 +310,113 @@ SubscrID SbclID 3 NULL drop table test1; drop table test2; create table t1 ( pk int primary key, dt datetime not null, da date not null, ye year not null, ti time not null, ts timestamp not null, index(dt), index(da), index(ye), index(ti), index(ts) ) engine=ndb; insert into t1 (pk,dt,da,ye,ti) values (1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59'), (2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59'), (3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00'), (4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00'), (5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06'), (6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06'), (7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10'), (8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11'), (9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59'); select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; count(*)-9 0 select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00'; count(*)-6 0 select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00'; count(*)-5 0 select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22'; count(*)-5 0 select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11'; count(*)-7 0 select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11'; count(*)-8 0 select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00'; count(*)-9 0 select count(*)-9 from t1 use index (da) where da > '1900-01-01'; count(*)-9 0 select count(*)-6 from t1 use index (da) where da >= '1955-12-31'; count(*)-6 0 select count(*)-5 from t1 use index (da) where da > '1955-12-31'; count(*)-5 0 select count(*)-5 from t1 use index (da) where da < '1970-03-03'; count(*)-5 0 select count(*)-6 from t1 use index (da) where da < '2001-01-01'; count(*)-6 0 select count(*)-8 from t1 use index (da) where da <= '2001-01-02'; count(*)-8 0 select count(*)-9 from t1 use index (da) where da <= '2055-01-01'; count(*)-9 0 select count(*)-9 from t1 use index (ye) where ye > '1900'; count(*)-9 0 select count(*)-6 from t1 use index (ye) where ye >= '1955'; count(*)-6 0 select count(*)-5 from t1 use index (ye) where ye > '1955'; count(*)-5 0 select count(*)-5 from t1 use index (ye) where ye < '1970'; count(*)-5 0 select count(*)-6 from t1 use index (ye) where ye < '2001'; count(*)-6 0 select count(*)-8 from t1 use index (ye) where ye <= '2001'; count(*)-8 0 select count(*)-9 from t1 use index (ye) where ye <= '2055'; count(*)-9 0 select count(*)-9 from t1 use index (ti) where ti >= '00:00:00'; count(*)-9 0 select count(*)-7 from t1 use index (ti) where ti > '00:00:00'; count(*)-7 0 select count(*)-7 from t1 use index (ti) where ti > '05:05:05'; count(*)-7 0 select count(*)-5 from t1 use index (ti) where ti > '06:06:06'; count(*)-5 0 select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; count(*)-5 0 select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; count(*)-6 0 select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; count(*)-8 0 select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; count(*)-9 0